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

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

Issue 15163003: Don't open Chrome browser window on first login of a new user. Because it will hide Getting Started… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change an implementation Created 7 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return in_synchronous_profile_launch_; 245 return in_synchronous_profile_launch_;
246 } 246 }
247 247
248 bool StartupBrowserCreator::LaunchBrowser( 248 bool StartupBrowserCreator::LaunchBrowser(
249 const CommandLine& command_line, 249 const CommandLine& command_line,
250 Profile* profile, 250 Profile* profile,
251 const base::FilePath& cur_dir, 251 const base::FilePath& cur_dir,
252 chrome::startup::IsProcessStartup process_startup, 252 chrome::startup::IsProcessStartup process_startup,
253 chrome::startup::IsFirstRun is_first_run, 253 chrome::startup::IsFirstRun is_first_run,
254 int* return_code) { 254 int* return_code) {
255
256 // Note: This check should have been done in ProcessCmdLineImpl()
257 // before calling this function. However chromeos/login/login_utils.cc
258 // calls this function directly (see comments there) so I have to check it
259 // again as a workaround.
260 if (command_line.HasSwitch(switches::kSilentLaunch)) {
261 return true;
262 }
263
255 in_synchronous_profile_launch_ = 264 in_synchronous_profile_launch_ =
256 process_startup == chrome::startup::IS_PROCESS_STARTUP; 265 process_startup == chrome::startup::IS_PROCESS_STARTUP;
257 DCHECK(profile); 266 DCHECK(profile);
258 267
259 // Continue with the incognito profile from here on if Incognito mode 268 // Continue with the incognito profile from here on if Incognito mode
260 // is forced. 269 // is forced.
261 if (IncognitoModePrefs::ShouldLaunchIncognito(command_line, 270 if (IncognitoModePrefs::ShouldLaunchIncognito(command_line,
262 profile->GetPrefs())) { 271 profile->GetPrefs())) {
263 profile = profile->GetOffTheRecordProfile(); 272 profile = profile->GetOffTheRecordProfile();
264 } else if (command_line.HasSwitch(switches::kIncognito)) { 273 } else if (command_line.HasSwitch(switches::kIncognito)) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 730
722 // static 731 // static
723 bool StartupBrowserCreator::ActivatedProfile() { 732 bool StartupBrowserCreator::ActivatedProfile() {
724 return profile_launch_observer.Get().activated_profile(); 733 return profile_launch_observer.Get().activated_profile();
725 } 734 }
726 735
727 bool HasPendingUncleanExit(Profile* profile) { 736 bool HasPendingUncleanExit(Profile* profile) {
728 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 737 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
729 !profile_launch_observer.Get().HasBeenLaunched(profile); 738 !profile_launch_observer.Get().HasBeenLaunched(profile);
730 } 739 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698