DescriptionInitialize chrome::DIR_USER_DATA early on for service processes, etc.
http://crrev.com/251126 broke service/helper processes.
(--user-data-dir command-line args weren't respected)
Restore the early PathService DIR_USER_DATA init/override.
(done as before in ChromeMainDelegate::PreSandboxStartup)
Move init code to a file-local InitializeUserDataDir helper.
Append the fallback to the commandline for other processes.
(otherwise child/service processes re-use the bad dir)
Simplify ChromeBrowserMainParts::PreCreateThreadsImpl.
(just get DIR_USER_DATA, don't re-attempt init/override)
Show a warning messagebox here if user-data-dir was invalid.
Move warning UI helper to c/b/ui/startup/bad_flags_prompt.h
Add [Get|Set]InvalidSpecifiedUserDataDir for warning UI.
(add dynamic_annotations dependency for LazyInstance usage)
Remove the ChromeMainUserDataDirTest.GetUserDataDir test.
(now ineffective, it can't hook before PreSandboxStartup)
BUG=345025, 345582, 318999
TEST=The --user-data-dir command-line argument works as expected for browser, child, and service processes (cloud print connector, chrome logging, etc.). Users are still warned with a dialog when they supply invalid or restricted directory paths for the browser.
R=sky@chromium.org,vitalybuka@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=253803
Patch Set 1 #
Total comments: 2
Patch Set 2 : Append the fallback user-data-dir to the commandline. #
Total comments: 1
Patch Set 3 : Remove the now inneffective ChromeMainUserDataDirTest.GetUserDataDir. #Patch Set 4 : Move utility functions into related files. #
Total comments: 6
Patch Set 5 : Address comments. #Patch Set 6 : Move helper functions around to avoid dependency issues. #
Total comments: 2
Patch Set 7 : Change CHECK to DCHECK for now. #Patch Set 8 : Do not run MaybeShowInvalidUserDataDirWarningDialog on Android. #Patch Set 9 : Remove user data dir init check; tests fail. #Patch Set 10 : Sync and rebase. #
Total comments: 2
Patch Set 11 : Add dynamic_annotations as a common_constants dependency for LazyInstance. #Patch Set 12 : Ditto for common_constants_win64; alphabetize. #Patch Set 13 : Use dynamic_annotations_win64 for common_constants_win64. #
Messages
Total messages: 74 (0 generated)
|