mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: use PathProvider for user-data-dir and others (#29649)
* refactor: use PathProvider for user-data-dir and others * consolidate logic for DIR_RECENT and DIR_APP_LOGS into path provider * fix bad include * remove debugging code * fix build on mac * fix build on win * create app logs dir on both mac and non-mac
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#include "components/prefs/in_memory_pref_store.h"
|
||||
@@ -104,7 +105,7 @@ void BrowserProcessImpl::PostEarlyInitialization() {
|
||||
// is the only key that needs it
|
||||
if (electron::fuses::IsCookieEncryptionEnabled()) {
|
||||
base::FilePath prefs_path;
|
||||
CHECK(base::PathService::Get(electron::DIR_USER_DATA, &prefs_path));
|
||||
CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &prefs_path));
|
||||
prefs_path = prefs_path.Append(FILE_PATH_LITERAL("Local State"));
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
scoped_refptr<JsonPrefStore> user_pref_store =
|
||||
|
||||
Reference in New Issue
Block a user