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

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

Issue 25073002: Remove bogus DCHECK for retail startup pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 "apps/app_load_service.h" 10 #include "apps/app_load_service.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 357 }
358 if (pref.type == SessionStartupPref::LAST && 358 if (pref.type == SessionStartupPref::LAST &&
359 IncognitoModePrefs::ShouldLaunchIncognito(command_line, prefs)) { 359 IncognitoModePrefs::ShouldLaunchIncognito(command_line, prefs)) {
360 // We don't store session information when incognito. If the user has 360 // We don't store session information when incognito. If the user has
361 // chosen to restore last session and launched incognito, fallback to 361 // chosen to restore last session and launched incognito, fallback to
362 // default launch behavior. 362 // default launch behavior.
363 pref.type = SessionStartupPref::DEFAULT; 363 pref.type = SessionStartupPref::DEFAULT;
364 } 364 }
365 365
366 #if defined(OS_CHROMEOS) 366 #if defined(OS_CHROMEOS)
367 // Kiosk/Retail mode has no profile to restore and fails to open the tabs 367 // Kiosk/Retail mode receives startup URLs through device settings. They are
368 // specified in the startup_urls policy if we try to restore the non-existent 368 // appended to the command line, which requires type DEFAULT to work.
369 // session which is the default for ChromeOS in general.
370 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { 369 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) {
pastarmovj 2013/09/27 15:48:25 No need for { }.
Mattias Nissler (ping if slow) 2013/09/27 15:52:13 Done.
371 DCHECK(pref.type == SessionStartupPref::LAST);
372 pref.type = SessionStartupPref::DEFAULT; 370 pref.type = SessionStartupPref::DEFAULT;
373 } 371 }
374 #endif // OS_CHROMEOS 372 #endif // OS_CHROMEOS
375 373
376 return pref; 374 return pref;
377 } 375 }
378 376
379 // static 377 // static
380 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() { 378 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() {
381 profile_launch_observer.Get().Clear(); 379 profile_launch_observer.Get().Clear();
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 743
746 // static 744 // static
747 bool StartupBrowserCreator::ActivatedProfile() { 745 bool StartupBrowserCreator::ActivatedProfile() {
748 return profile_launch_observer.Get().activated_profile(); 746 return profile_launch_observer.Get().activated_profile();
749 } 747 }
750 748
751 bool HasPendingUncleanExit(Profile* profile) { 749 bool HasPendingUncleanExit(Profile* profile) {
752 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 750 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
753 !profile_launch_observer.Get().HasBeenLaunched(profile); 751 !profile_launch_observer.Get().HasBeenLaunched(profile);
754 } 752 }
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