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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 2441823002: Suppressing First Run Bubble when chrome://welcome is displayed. (Closed)
Patch Set: Using empty path for URL check 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« 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