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

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

Issue 2409423005: Compare GURLs to kUrlConstants with .spec() and string equality (Closed)
Patch Set: git cl format Created 4 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 add_promo = false; 976 add_promo = false;
977 break; 977 break;
978 } 978 }
979 } 979 }
980 980
981 if (add_promo) { 981 if (add_promo) {
982 // If the first URL is the NTP, replace it with the sync promo. This 982 // If the first URL is the NTP, replace it with the sync promo. This
983 // behavior is desired because completing or skipping the sync promo 983 // behavior is desired because completing or skipping the sync promo
984 // causes a redirect to the NTP. 984 // causes a redirect to the NTP.
985 if (!startup_urls->empty() && 985 if (!startup_urls->empty() &&
986 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 986 startup_urls->at(0).spec() == chrome::kChromeUINewTabURL)
987 startup_urls->at(0) = sync_promo_url; 987 startup_urls->at(0) = sync_promo_url;
988 else 988 else
989 startup_urls->insert(startup_urls->begin(), sync_promo_url); 989 startup_urls->insert(startup_urls->begin(), sync_promo_url);
990 } 990 }
991 } 991 }
992 } 992 }
993 993
994 void StartupBrowserCreatorImpl::AddSpecialURLs( 994 void StartupBrowserCreatorImpl::AddSpecialURLs(
995 std::vector<GURL>* url_list) const { 995 std::vector<GURL>* url_list) const {
996 // Optionally include the welcome page. 996 // Optionally include the welcome page.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 #if defined(OS_WIN) 1081 #if defined(OS_WIN)
1082 TriggeredProfileResetter* triggered_profile_resetter = 1082 TriggeredProfileResetter* triggered_profile_resetter =
1083 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 1083 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
1084 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 1084 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
1085 if (triggered_profile_resetter) { 1085 if (triggered_profile_resetter) {
1086 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 1086 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1087 } 1087 }
1088 #endif // defined(OS_WIN) 1088 #endif // defined(OS_WIN)
1089 return has_reset_trigger; 1089 return has_reset_trigger;
1090 } 1090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698