diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 16:17:12 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 16:17:12 +0000 |
commit | e9d7b6cf453475ad269785f3775700339c8a03fb (patch) | |
tree | 14fa3a46e2579183c3be5d46a808cf3d884b36b4 /chrome/browser/first_run_win.cc | |
parent | 5b2e8faf4be9281ed3775a2d9e1462a56880a678 (diff) | |
download | chromium_src-e9d7b6cf453475ad269785f3775700339c8a03fb.zip chromium_src-e9d7b6cf453475ad269785f3775700339c8a03fb.tar.gz chromium_src-e9d7b6cf453475ad269785f3775700339c8a03fb.tar.bz2 |
Some code had been removed from FirstRun::IsChromeFirstRun() so that it may return true then false when later invoked.This caused a bug where we would show the info-bar warning that Chromium is not the default browser after the first run.This patch resurrects that code and changes the first run UI, as it was relying on that behavior.BUG=http://crbug.com/15833TEST=Make IE or Firefox your default browser. Open Chromium so it shows the 1st run UI. Unselect the "make chromium my default browser" button, then press start. When Chromium shows up, there should be no info-bar warning you Chromium is not your default browser. Also test that the first run UI still works as expected.
Review URL: http://codereview.chromium.org/155168
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run_win.cc')
-rw-r--r-- | chrome/browser/first_run_win.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc index 1d4d7bb4..4e58792 100644 --- a/chrome/browser/first_run_win.cc +++ b/chrome/browser/first_run_win.cc @@ -340,13 +340,17 @@ bool Upgrade::SwapNewChromeExeIfPresent() { return false; } -void OpenFirstRunDialog(Profile* profile, +bool OpenFirstRunDialog(Profile* profile, ProcessSingleton* process_singleton) { DCHECK(profile); DCHECK(process_singleton); + // We need the FirstRunView to outlive its parent, as we retrieve the accept + // state from it after the dialog has been closed. + scoped_ptr<FirstRunView> first_run_view(new FirstRunView(profile)); + first_run_view->SetParentOwned(false); views::Window* first_run_ui = views::Window::CreateChromeWindow( - NULL, gfx::Rect(), new FirstRunView(profile)); + NULL, gfx::Rect(), first_run_view.get()); DCHECK(first_run_ui); // We need to avoid dispatching new tabs when we are doing the import @@ -363,6 +367,8 @@ void OpenFirstRunDialog(Profile* profile, // that keyboard accelerators (Enter, Esc, etc) work in the dialog box. MessageLoopForUI::current()->Run(g_browser_process->accelerator_handler()); process_singleton->Unlock(); + + return first_run_view->accepted(); } namespace { |