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

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

Issue 1312693005: Remove migration of obsolete value for "session.restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url-to-restore-on-startup
Patch Set: Re-enable the two tests Created 5 years 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
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_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 } else if (pref.type == SessionStartupPref::URLS && !pref.urls.empty() && 674 } else if (pref.type == SessionStartupPref::URLS && !pref.urls.empty() &&
675 !HasPendingUncleanExit(profile_)) { 675 !HasPendingUncleanExit(profile_)) {
676 std::vector<GURL> extra_urls; 676 std::vector<GURL> extra_urls;
677 AddSpecialURLs(&extra_urls); 677 AddSpecialURLs(&extra_urls);
678 UrlsToTabs(extra_urls, &tabs); 678 UrlsToTabs(extra_urls, &tabs);
679 679
680 // Only use the set of urls specified in preferences if nothing was 680 // Only use the set of urls specified in preferences if nothing was
681 // specified on the command line. Filter out any urls that are to be 681 // specified on the command line. Filter out any urls that are to be
682 // restored by virtue of having been previously pinned. 682 // restored by virtue of having been previously pinned.
683 AddUniqueURLs(pref.urls, &tabs); 683 AddUniqueURLs(pref.urls, &tabs);
684 } else if (pref.type == SessionStartupPref::HOMEPAGE) {
685 // If 'homepage' selected, either by the user or by a policy, we should
686 // have migrated them to another value.
687 NOTREACHED() << "SessionStartupPref has deprecated type HOMEPAGE";
688 } 684 }
689 685
690 if (tabs.empty()) 686 if (tabs.empty())
691 return NULL; 687 return NULL;
692 688
693 Browser* browser = OpenTabsInBrowser(NULL, true, tabs, desktop_type); 689 Browser* browser = OpenTabsInBrowser(NULL, true, tabs, desktop_type);
694 return browser; 690 return browser;
695 } 691 }
696 692
697 void StartupBrowserCreatorImpl::AddUniqueURLs(const std::vector<GURL>& urls, 693 void StartupBrowserCreatorImpl::AddUniqueURLs(const std::vector<GURL>& urls,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 #if defined(OS_WIN) 992 #if defined(OS_WIN)
997 TriggeredProfileResetter* triggered_profile_resetter = 993 TriggeredProfileResetter* triggered_profile_resetter =
998 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 994 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
999 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 995 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
1000 if (triggered_profile_resetter) { 996 if (triggered_profile_resetter) {
1001 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 997 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1002 } 998 }
1003 #endif // defined(OS_WIN) 999 #endif // defined(OS_WIN)
1004 return has_reset_trigger; 1000 return has_reset_trigger;
1005 } 1001 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/restore_on_startup_policy_handler_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698