diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:52:38 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:52:38 +0000 |
commit | 3f002a386bfa32f34479d9eb22531120d51394e5 (patch) | |
tree | 2e632cdaf3eeabc75c7183817b23d0d8841d87de /chrome/browser/chrome_browser_main_win.cc | |
parent | e82b2bd016395079f0f9c8080d3499dc9bccd347 (diff) | |
download | chromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.zip chromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.tar.gz chromium_src-3f002a386bfa32f34479d9eb22531120d51394e5.tar.bz2 |
Refactor first_run, very few things should depend on whether the First Run 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
Diffstat (limited to 'chrome/browser/chrome_browser_main_win.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main_win.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 5e959c4..67850ba 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc @@ -17,8 +17,6 @@ #include "base/path_service.h" #include "base/scoped_native_library.h" #include "base/string_number_conversions.h" -#include "base/threading/sequenced_worker_pool.h" -#include "base/time.h" #include "base/utf_string_conversions.h" #include "base/win/metro.h" #include "base/win/text_services_message_filter.h" @@ -43,7 +41,6 @@ #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/shell_util.h" -#include "content/public/browser/browser_thread.h" #include "content/public/common/main_function_params.h" #include "grit/app_locale_settings.h" #include "grit/chromium_strings.h" @@ -230,26 +227,6 @@ void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() { removable_device_notifications_window_->Init(); } -void ChromeBrowserMainPartsWin::PreInteractiveFirstRunInit() { - // Trigger the Active Setup command for system-level Chromes to finish - // configuring this user's install (e.g. per-user shortcuts). - // Delay the task slightly to give Chrome launch I/O priority while also - // making sure shortcuts are created promptly to avoid annoying the user by - // re-creating shortcuts he previously deleted. - static const int64 kTiggerActiveSetupDelaySeconds = 5; - FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { - NOTREACHED(); - } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) { - content::BrowserThread::GetBlockingPool()->PostDelayedTask( - FROM_HERE, - base::Bind(&InstallUtil::TriggerActiveSetupCommand), - base::TimeDelta::FromSeconds(kTiggerActiveSetupDelaySeconds)); - } - - ChromeBrowserMainParts::PreInteractiveFirstRunInit(); -} - void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), |