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

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

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_tab_provider.h" 5 #include "chrome/browser/ui/startup/startup_tab_provider.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/first_run/first_run.h" 8 #include "chrome/browser/first_run/first_run.h"
9 #include "chrome/browser/profile_resetter/triggered_profile_resetter.h" 9 #include "chrome/browser/profile_resetter/triggered_profile_resetter.h"
10 #include "chrome/browser/profile_resetter/triggered_profile_resetter_factory.h" 10 #include "chrome/browser/profile_resetter/triggered_profile_resetter_factory.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const std::vector<GURL>& first_run_tabs) { 90 const std::vector<GURL>& first_run_tabs) {
91 // Constants: Magic words used by Master Preferences files in place of a URL 91 // Constants: Magic words used by Master Preferences files in place of a URL
92 // host to indicate that internal pages should appear on first run. 92 // host to indicate that internal pages should appear on first run.
93 static constexpr char kNewTabUrlHost[] = "new_tab_page"; 93 static constexpr char kNewTabUrlHost[] = "new_tab_page";
94 static constexpr char kWelcomePageUrlHost[] = "welcome_page"; 94 static constexpr char kWelcomePageUrlHost[] = "welcome_page";
95 95
96 StartupTabs tabs; 96 StartupTabs tabs;
97 if (is_first_run) { 97 if (is_first_run) {
98 tabs.reserve(first_run_tabs.size()); 98 tabs.reserve(first_run_tabs.size());
99 for (GURL url : first_run_tabs) { 99 for (GURL url : first_run_tabs) {
100 if (url.host() == kNewTabUrlHost) 100 if (url.host_piece() == kNewTabUrlHost)
101 url = GURL(chrome::kChromeUINewTabURL); 101 url = GURL(chrome::kChromeUINewTabURL);
102 else if (url.host() == kWelcomePageUrlHost) 102 else if (url.host_piece() == kWelcomePageUrlHost)
103 url = GetWelcomePageUrl(); 103 url = GetWelcomePageUrl();
104 tabs.emplace_back(url, false); 104 tabs.emplace_back(url, false);
105 } 105 }
106 } 106 }
107 return tabs; 107 return tabs;
108 } 108 }
109 109
110 // static 110 // static
111 StartupTabs StartupTabProviderImpl::CheckResetTriggerTabPolicy( 111 StartupTabs StartupTabProviderImpl::CheckResetTriggerTabPolicy(
112 bool profile_has_trigger) { 112 bool profile_has_trigger) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // static 147 // static
148 GURL StartupTabProviderImpl::GetWelcomePageUrl() { 148 GURL StartupTabProviderImpl::GetWelcomePageUrl() {
149 return GURL(chrome::kChromeUIWelcomeURL); 149 return GURL(chrome::kChromeUIWelcomeURL);
150 } 150 }
151 151
152 // static 152 // static
153 GURL StartupTabProviderImpl::GetTriggeredResetSettingsUrl() { 153 GURL StartupTabProviderImpl::GetTriggeredResetSettingsUrl() {
154 return GURL( 154 return GURL(
155 chrome::GetSettingsUrl(chrome::kTriggeredResetProfileSettingsSubPage)); 155 chrome::GetSettingsUrl(chrome::kTriggeredResetProfileSettingsSubPage));
156 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/hosted_app_browser_controller.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698