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

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

Issue 25076007: Remove obsolete special case for Retail mode start-up urls policy. (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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 pref.type = SessionStartupPref::LAST; 356 pref.type = SessionStartupPref::LAST;
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)
367 // Kiosk/Retail mode has no profile to restore and fails to open the tabs
368 // specified in the startup_urls policy if we try to restore the non-existent
369 // session which is the default for ChromeOS in general.
370 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) {
371 DCHECK(pref.type == SessionStartupPref::LAST);
372 pref.type = SessionStartupPref::DEFAULT;
373 }
374 #endif // OS_CHROMEOS
375
376 return pref; 366 return pref;
377 } 367 }
378 368
379 // static 369 // static
380 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() { 370 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() {
381 profile_launch_observer.Get().Clear(); 371 profile_launch_observer.Get().Clear();
382 } 372 }
383 373
384 // static 374 // static
385 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( 375 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine(
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 735
746 // static 736 // static
747 bool StartupBrowserCreator::ActivatedProfile() { 737 bool StartupBrowserCreator::ActivatedProfile() {
748 return profile_launch_observer.Get().activated_profile(); 738 return profile_launch_observer.Get().activated_profile();
749 } 739 }
750 740
751 bool HasPendingUncleanExit(Profile* profile) { 741 bool HasPendingUncleanExit(Profile* profile) {
752 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 742 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
753 !profile_launch_observer.Get().HasBeenLaunched(profile); 743 !profile_launch_observer.Get().HasBeenLaunched(profile);
754 } 744 }
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