summaryrefslogtreecommitdiffstats
path: root/chrome/common/switch_utils_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert 201968 "Revert 201837 "OOP import on Windows.""dbeam@chromium.org2013-05-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorry about that, seems to be a different issue - http://crbug.com/177163 > Revert 201837 "OOP import on Windows." > > This broke browser_tests on XP Tests (dbg)(4): > http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%284%29/builds/33240 > > [1148:3528:0523/123340:2643015:WARNING:extension_apitest.cc(169)] Workaround for 177163, prematurely stopping test > > > OOP import on Windows. > > > > Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today). > > > > Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459). > > > > Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!). > > > > Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL). > > To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites). > > > > This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880). > > > > Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case). > > > > Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :). > > > > This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)). > > > > This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better). > > > > BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225 > > > > Review URL: https://chromiumcodereview.appspot.com/12670013 > > TBR=gab@chromium.org > > Review URL: https://codereview.chromium.org/15968002 TBR=dbeam@chromium.org Review URL: https://codereview.chromium.org/15876003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201977 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 201837 "OOP import on Windows."dbeam@chromium.org2013-05-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This broke browser_tests on XP Tests (dbg)(4): http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%284%29/builds/33240 [1148:3528:0523/123340:2643015:WARNING:extension_apitest.cc(169)] Workaround for 177163, prematurely stopping test > OOP import on Windows. > > Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today). > > Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459). > > Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!). > > Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL). > To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites). > > This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880). > > Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case). > > Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :). > > This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)). > > This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better). > > BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225 > > Review URL: https://chromiumcodereview.appspot.com/12670013 TBR=gab@chromium.org Review URL: https://codereview.chromium.org/15968002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201968 0039d316-1c4b-4281-b951-d872f2087c98
* OOP import on Windows.gab@chromium.org2013-05-231-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today). Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459). Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!). Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL). To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites). This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880). Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case). Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :). This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)). This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better). BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225 Review URL: https://chromiumcodereview.appspot.com/12670013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201837 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor first_run, very few things should depend on whether the First Run ↵gab@chromium.org2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | sentinel itself was present... (i.e. most tasks should not be on if flags such as --no-first-run are present). This is a prerequisite for issue 165048 as we want to be able to launch Chrome with --no-first-run and have two guarantees: 1) No first run tasks happen 2) First Run sentinel is set so that first run never happens for this new Chrome. This also removes PreInteractiveFirstRunInit() and PostInteractiveFirstRunInit() from BrowserMainParts as I just realized AutoImport is now silent and it is thus no longer necessary to split this in two :)! Moved everything to first_run::PostImportTasks(). This CL also buffs --first-run to --force-first-run (to be more explicit); --first-run now overrides --no-first-run as far as first run tasks are concerned (i.e. as far as everything first run related is concerned; except code that specifically looks for --no-first-run on the command line) -- kNoFirstRun used to state it would override kFirstRun, but that wasn't true anyways ans it makes more sense/is more useful the other way around. Now a browser test may specify --force-first-run and get the full first run experience even if the underlying test harness specifies --no-first-run for all tests :). --no-first-run is otherwise unaffected (i.e. same behavior as before) if --force-first-run is not present BUG=165048 TEST= 1) Run chrome.exe --force-first-run from build output and see First Run flow although First Run beacon is present. 2) Delete "First Run" beacon and ensure that chrome.exe --no-first-run both skips the first run and creates the beacon. 3) Ensure that chrome.exe --force-first-run --no-first-run acts the same as chrome.exe --force-first-run. Review URL: https://chromiumcodereview.appspot.com/11636031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174809 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CommandLine::GetCommandLineString().msw@chromium.org2011-07-201-2/+2
| | | | | | | | | | | | Fix string hackery in net/tools/dump_cache/dump_cache.cc Fix const casts in chrome/installer/util/product.cc and base/process_util_win.cc. BUG=73195 TEST=none Review URL: http://codereview.chromium.org/7386002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93165 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate most CommandLine code across platforms.msw@chromium.org2011-05-141-12/+25
| | | | | | | | | | | | | | | | | | | | | | Significant refactoring with some notable behavior changes: 1. Switches are appended preceding existing arguments (after other swtiches). 2. (Windows) command_line_string() is generated and properly quoted/escaped. 3. Appended switches will retain their (optional) included prefixes (--,-,/). Notable internal changes (shouldn't affect behavior): 1. (Windows) Generate the cl string, instead of storing&updating the original. 2. Explicitly retain switch prefixes (--,-,/) (was automatic in init*/ctor). Update (obvious) code expecting switches to be appended antecedent to args. Add Nico's test from: codereview.chromium.org/6728016/. An intermediary CL landed between patch set 3 and 4, see: http://codereview.chromium.org/6596020 BUG=73195,67764 TEST=Commandline usage. Review URL: http://codereview.chromium.org/6526040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85360 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Cleanup in the following files:jhawkins@chromium.org2011-04-041-1/+2
| | | | | | | | | | | | | | | | | | | | | * at_exit.cc * atomicops.h * base_paths.h * bzip2_error_handler.cc * callback_internal.h * command_line.cc * cpu.cc * environment.h * event_recorder.cc * file_descriptor_shuffle.cc * file_path.cc BUG=none TEST=none Review URL: http://codereview.chromium.org/6759017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80340 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded includes of chrome_switches.h.thestig@chromium.org2011-01-111-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6086003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70978 0039d316-1c4b-4281-b951-d872f2087c98
* Remove one-time flags when restarting after update.finnur@chromium.org2010-09-221-0/+46
BUG=53407 TEST=SwitchUtilsTest.AddRemoveSwitches Review URL: http://codereview.chromium.org/3307024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60161 0039d316-1c4b-4281-b951-d872f2087c98