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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 10696093: Hide the main window when Set-As-Default dialog is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review remarks. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 DISALLOW_COPY_AND_ASSIGN(ProfileLaunchObserver); 149 DISALLOW_COPY_AND_ASSIGN(ProfileLaunchObserver);
150 }; 150 };
151 151
152 base::LazyInstance<ProfileLaunchObserver> profile_launch_observer = 152 base::LazyInstance<ProfileLaunchObserver> profile_launch_observer =
153 LAZY_INSTANCE_INITIALIZER; 153 LAZY_INSTANCE_INITIALIZER;
154 154
155 } // namespace 155 } // namespace
156 156
157 StartupBrowserCreator::StartupBrowserCreator() 157 StartupBrowserCreator::StartupBrowserCreator()
158 : is_default_browser_dialog_suppressed_(false) { 158 : is_default_browser_dialog_suppressed_(false),
159 show_main_browser_window_(true) {
159 } 160 }
160 161
161 StartupBrowserCreator::~StartupBrowserCreator() {} 162 StartupBrowserCreator::~StartupBrowserCreator() {}
162 163
163 // static 164 // static
164 bool StartupBrowserCreator::was_restarted_read_ = false; 165 bool StartupBrowserCreator::was_restarted_read_ = false;
165 166
166 void StartupBrowserCreator::AddFirstRunTab(const GURL& url) { 167 void StartupBrowserCreator::AddFirstRunTab(const GURL& url) {
167 first_run_tabs_.push_back(url); 168 first_run_tabs_.push_back(url);
168 } 169 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 NOTREACHED(); 558 NOTREACHED();
558 return; 559 return;
559 } 560 }
560 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); 561 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL);
561 } 562 }
562 563
563 bool HasPendingUncleanExit(Profile* profile) { 564 bool HasPendingUncleanExit(Profile* profile) {
564 return !profile->DidLastSessionExitCleanly() && 565 return !profile->DidLastSessionExitCleanly() &&
565 !profile_launch_observer.Get().HasBeenLaunched(profile); 566 !profile_launch_observer.Get().HasBeenLaunched(profile);
566 } 567 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698