Index: chrome/browser/first_run/first_run.cc |
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc |
index 629e9520d963d9776cbf44c6c0f8026a6b43ab4c..e1d7dd2e7ac41876f2ce4050e61a3354190e967b 100644 |
--- a/chrome/browser/first_run/first_run.cc |
+++ b/chrome/browser/first_run/first_run.cc |
@@ -330,12 +330,19 @@ bool IsOnWelcomePage(content::WebContents* contents) { |
// We have to check both the GetURL() similar to the other checks below, but |
// also the original request url because the welcome page we use is a |
// redirect. |
- GURL welcome_page(l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL)); |
- return contents->GetURL() == welcome_page || |
- (contents->GetController().GetVisibleEntry() && |
- contents->GetController() |
- .GetVisibleEntry() |
- ->GetOriginalRequestURL() == welcome_page); |
+ // TODO(crbug.com/651465): Remove this once kUseConsolidatedStartupFlow is on |
+ // by default. |
+ const GURL deprecated_welcome_page( |
+ l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL)); |
+ if (contents->GetURL() == deprecated_welcome_page || |
+ (contents->GetController().GetVisibleEntry() && |
+ contents->GetController().GetVisibleEntry()->GetOriginalRequestURL() == |
+ deprecated_welcome_page)) { |
+ return true; |
+ } |
+ |
+ const GURL welcome_page(chrome::kChromeUIWelcomeURL); |
+ return contents->GetURL().GetWithEmptyPath() == welcome_page; |
} |
// Show the first run search engine bubble at the first appropriate opportunity. |