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
3
shell/browser/browser.cc
Executable file → Normal file
3
shell/browser/browser.cc
Executable file → Normal file
|
@ -14,6 +14,7 @@
|
|||
#include "base/run_loop.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "shell/browser/browser_observer.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/login_handler.h"
|
||||
|
@ -187,7 +188,7 @@ void Browser::DidFinishLaunching(base::DictionaryValue launch_info) {
|
|||
// Make sure the userData directory is created.
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
base::FilePath user_data;
|
||||
if (base::PathService::Get(DIR_USER_DATA, &user_data))
|
||||
if (base::PathService::Get(chrome::DIR_USER_DATA, &user_data))
|
||||
base::CreateDirectoryAndGetError(user_data, nullptr);
|
||||
|
||||
is_ready_ = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue