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

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: 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 | « no previous file | 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 #if defined(OS_CHROMEOS)
257 // Not to open default Chrome window for the first login of a new
Finnur 2013/05/15 10:24:33 nit: Not to open -> Don't open
cylee1 2013/05/15 13:39:49 Done.
258 // user because it will hide the Getting Started App window (which is
259 // launched automatically in that situation).
260 //
261 // Note(cylee): Ideally this check should be put in ProcessCmdLineImpl()
Finnur 2013/05/15 10:24:33 style: Note(cylee) is not something we use. Use ei
cylee1 2013/05/15 13:39:49 Done.
262 // before calling this function. However in chromeos/login/login_utils.cc
Finnur 2013/05/15 10:24:33 nit: suggest rewording: "However, chromeos/login/l
cylee1 2013/05/15 13:39:49 Done.
263 // it directly calls this function (see comments there) so I have to get it
264 // down here.
265 if (chromeos::UserManager::Get()->IsCurrentUserNew()) {
266 return true;
267 }
Finnur 2013/05/15 10:24:33 style: No braces around single line if clauses.
cylee1 2013/05/15 13:39:49 Done.
268 #endif
269
Finnur 2013/05/15 10:24:33 nit: Also, suggest changing 'hind'->'hide' in the
cylee1 2013/05/15 13:39:49 Done.
255 in_synchronous_profile_launch_ = 270 in_synchronous_profile_launch_ =
256 process_startup == chrome::startup::IS_PROCESS_STARTUP; 271 process_startup == chrome::startup::IS_PROCESS_STARTUP;
257 DCHECK(profile); 272 DCHECK(profile);
258 273
259 // Continue with the incognito profile from here on if Incognito mode 274 // Continue with the incognito profile from here on if Incognito mode
260 // is forced. 275 // is forced.
261 if (IncognitoModePrefs::ShouldLaunchIncognito(command_line, 276 if (IncognitoModePrefs::ShouldLaunchIncognito(command_line,
262 profile->GetPrefs())) { 277 profile->GetPrefs())) {
263 profile = profile->GetOffTheRecordProfile(); 278 profile = profile->GetOffTheRecordProfile();
264 } else if (command_line.HasSwitch(switches::kIncognito)) { 279 } else if (command_line.HasSwitch(switches::kIncognito)) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 736
722 // static 737 // static
723 bool StartupBrowserCreator::ActivatedProfile() { 738 bool StartupBrowserCreator::ActivatedProfile() {
724 return profile_launch_observer.Get().activated_profile(); 739 return profile_launch_observer.Get().activated_profile();
725 } 740 }
726 741
727 bool HasPendingUncleanExit(Profile* profile) { 742 bool HasPendingUncleanExit(Profile* profile) {
728 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 743 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
729 !profile_launch_observer.Get().HasBeenLaunched(profile); 744 !profile_launch_observer.Get().HasBeenLaunched(profile);
730 } 745 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698