Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 1010923002: If possible, use the PathService instead of the --user-data-dir flag directly (Closed)

Created:
5 years, 9 months ago by noms (inactive)
Modified:
5 years, 8 months ago
Reviewers:
noms, sky, grt (UTC plus 2)
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, wfh+watch_chromium.org, grt+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/c527ac73268c6f603dfa6aa41ee9a0c3d79d5095 Cr-Commit-Position: refs/heads/master@{#322697}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : undo some changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -5 lines) Patch
M chrome/app/chrome_main_delegate.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/installer/util/auto_launch_util.cc View 1 1 chunk +9 lines, -2 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (17 generated)
noms (inactive)
Hiya Greg! While I'm chasing down the last failing test (grrr), would you mind taking ...
5 years, 9 months ago (2015-03-24 20:43:56 UTC) #15
grt (UTC plus 2)
Ugh https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/shell_integration.cc File chrome/browser/shell_integration.cc (right): https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/shell_integration.cc#newcode91 chrome/browser/shell_integration.cc:91: policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); this isn't needed now, is it? https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/ui/views/app_list/win/app_list_service_win.cc ...
5 years, 9 months ago (2015-03-26 18:36:22 UTC) #16
noms
This CL is going great! Only 3 files to go until it's a no-op. Done ...
5 years, 9 months ago (2015-03-27 17:03:58 UTC) #18
grt (UTC plus 2)
lgtm
5 years, 9 months ago (2015-03-27 19:13:28 UTC) #19
noms
+ sky for owners stamp on chrome/service. Also as proof that I actually finished this ...
5 years, 9 months ago (2015-03-27 19:16:30 UTC) #21
sky
Nice, LGTM
5 years, 9 months ago (2015-03-27 21:18:38 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010923002/280001
5 years, 9 months ago (2015-03-28 03:31:20 UTC) #24
commit-bot: I haz the power
Committed patchset #2 (id:280001)
5 years, 9 months ago (2015-03-28 03:35:12 UTC) #25
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/c527ac73268c6f603dfa6aa41ee9a0c3d79d5095 Cr-Commit-Position: refs/heads/master@{#322697}
5 years, 9 months ago (2015-03-28 03:35:57 UTC) #26
noms (inactive)
5 years, 8 months ago (2015-03-30 14:06:33 UTC) #27
Message was sent while issue was closed.
Oops, I had unsent drafts :/

https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/shell_i...
File chrome/browser/shell_integration.cc (right):

https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/shell_i...
chrome/browser/shell_integration.cc:91:
policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
On 2015/03/26 18:36:22, grt wrote:
> this isn't needed now, is it?

Done.

https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/ui/view...
File chrome/browser/ui/views/app_list/win/app_list_service_win.cc (left):

https://codereview.chromium.org/1010923002/diff/260001/chrome/browser/ui/view...
chrome/browser/ui/views/app_list/win/app_list_service_win.cc:129:
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
On 2015/03/26 18:36:22, grt wrote:
> i hate to say it, but leave this one alone. it would be bad to change the app
> model id in this case.

Done.

https://codereview.chromium.org/1010923002/diff/260001/chrome/installer/util/...
File chrome/installer/util/auto_launch_util.cc (right):

https://codereview.chromium.org/1010923002/diff/260001/chrome/installer/util/...
chrome/installer/util/auto_launch_util.cc:188: if
(command_line.HasSwitch(switches::kUserDataDir)) {
On 2015/03/26 18:36:22, grt wrote:
> this is subtle, so i think it needs a comment. i suggest:
>       // Propagate --user-data-dir if it was specified on the command line.
>       // Retrieve the value from the PathService since some sanitation may
have
>       // taken place. There is no need to add it to the command line in the
>       // event that the dir was overridden by Group Policy since the GP
override
>       // will be in force when Chrome is launched.
> but feel free to reword if i'm missing something.

Done.

https://codereview.chromium.org/1010923002/diff/260001/chrome/service/cloud_p...
File chrome/service/cloud_print/cloud_print_proxy.cc (left):

https://codereview.chromium.org/1010923002/diff/260001/chrome/service/cloud_p...
chrome/service/cloud_print/cloud_print_proxy.cc:37: const base::CommandLine&
process_command_line =
On 2015/03/26 18:36:22, grt wrote:
> i think this is okay as-is since the launched process will get the value from
GP
> if it is overridden there. i suggest:
>   // Propagate an explicit --user-data-dir value if one was given. The new
>   // browser process will pick up a policy override during initialization.

Done.

https://codereview.chromium.org/1010923002/diff/260001/cloud_print/service/wi...
File cloud_print/service/win/chrome_launcher.cc (left):

https://codereview.chromium.org/1010923002/diff/260001/cloud_print/service/wi...
cloud_print/service/win/chrome_launcher.cc:159:
cmd.GetSwitchValuePath(switches::kUserDataDir));
On 2015/03/26 18:36:22, grt wrote:
> i wouldn't touch this one. it seems to me that cloud_print_service.exe is its
> own thing with its own user data dir. it doesn't appear to register the chrome
> path provider, so chrome::DIR_USER_DATA won't work.

Done.

https://codereview.chromium.org/1010923002/diff/260001/cloud_print/service/wi...
File cloud_print/service/win/cloud_print_service.cc (left):

https://codereview.chromium.org/1010923002/diff/260001/cloud_print/service/wi...
cloud_print/service/win/cloud_print_service.cc:212: user_data_dir_switch_ =
On 2015/03/26 18:36:22, grt wrote:
> leave this one alone, too

Done.

Powered by Google App Engine
This is Rietveld 408576698