fix: create userData on requestSingleInstanceLock() if needed (#33559) (#33592)

* test: use custom userData folder for requestSingleInstanceLock()

* update test

* prefix test folder path

* fix: create userDataDir on requestSingleInstanceLock() if needed

* Trigger Build

Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
This commit is contained in:
trop[bot]
2022-04-04 10:48:04 +02:00
committed by GitHub
parent c85bc3c932
commit 769088f8dc
4 changed files with 25 additions and 0 deletions

View File

@@ -1148,6 +1148,8 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) {
base::FilePath user_dir;
base::PathService::Get(chrome::DIR_USER_DATA, &user_dir);
// The user_dir may not have been created yet.
base::CreateDirectoryAndGetError(user_dir, nullptr);
auto cb = base::BindRepeating(&App::OnSecondInstance, base::Unretained(this));
auto wrapped_cb = base::BindRepeating(NotificationCallbackWrapper, cb);