diff options
author | noms <noms@chromium.org> | 2015-03-27 20:35:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-28 03:35:31 +0000 |
commit | c527ac73268c6f603dfa6aa41ee9a0c3d79d5095 (patch) | |
tree | 65d804a493b8b06df446bc2a66fe08c7df46185d /chrome/app/chrome_main_delegate.cc | |
parent | a357285fdc24b17ac991cddc6ec902cb5d626fde (diff) | |
download | chromium_src-c527ac73268c6f603dfa6aa41ee9a0c3d79d5095.zip chromium_src-c527ac73268c6f603dfa6aa41ee9a0c3d79d5095.tar.gz chromium_src-c527ac73268c6f603dfa6aa41ee9a0c3d79d5095.tar.bz2 |
If possible, use the PathService instead of the --user-data-dir flag directly
Some classes still using it directly are:
- cloud_print_proxy_process_browsertest.cc (it's not a browser test so it doesn't
call ChromeMainDelegate::PreSandboxStartup(), which sets up the PathService
to know about the user-data-dir
- in_process_browser_test.cc, which needs to set up the user-data-dir directory
before PreSandboxStartup() is called
- diagnostics_model and diagnostics_controller, which are used in
BasicStartupComplete(), which is called before PreSandboxStartup() where the
PathService is set up
- shell_integration_win.cc which has a function that's used in unit tests, which
don't call PreSandboxStartup()
- chrome/browser/shell_integration.cc is used differently on linux than on other
platforms, and on the former a desktop app shortcut uses a different command line
that that of Chrome's
- cloud_print/service/*, since it seems to be its own thing, and have a separate
user_data_dir
BUG=464616
Review URL: https://codereview.chromium.org/1010923002
Cr-Commit-Position: refs/heads/master@{#322697}
Diffstat (limited to 'chrome/app/chrome_main_delegate.cc')
-rw-r--r-- | chrome/app/chrome_main_delegate.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index e25ff4f..c9578a9 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -345,10 +345,8 @@ void InitializeUserDataDir() { // On Windows, trailing separators leave Chrome in a bad state. // See crbug.com/464616. - if (user_data_dir.EndsWithSeparator()) { + if (user_data_dir.EndsWithSeparator()) user_data_dir = user_data_dir.StripTrailingSeparators(); - command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); - } const bool specified_directory_was_invalid = !user_data_dir.empty() && !PathService::OverrideAndCreateIfNeeded(chrome::DIR_USER_DATA, |