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:
parent
8b945cb296
commit
ebf54d7cc0
16 changed files with 115 additions and 108 deletions
|
@ -1023,7 +1023,7 @@ void ElectronBrowserClient::OnNetworkServiceCreated(
|
|||
std::vector<base::FilePath>
|
||||
ElectronBrowserClient::GetNetworkContextsParentDirectory() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(DIR_USER_DATA, &user_data_dir);
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
||||
DCHECK(!user_data_dir.empty());
|
||||
|
||||
return {user_data_dir};
|
||||
|
@ -1416,7 +1416,7 @@ std::string ElectronBrowserClient::GetApplicationLocale() {
|
|||
|
||||
base::FilePath ElectronBrowserClient::GetFontLookupTableCacheDir() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(DIR_USER_DATA, &user_data_dir);
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
||||
DCHECK(!user_data_dir.empty());
|
||||
return user_data_dir.Append(FILE_PATH_LITERAL("FontLookupTableCache"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue