Commit 14bebe60 authored by tmartino's avatar tmartino Committed by Commit bot

Suppressing First Run Bubble when chrome://welcome is displayed.

BUG=656178

Review-Url: https://chromiumcodereview.appspot.com/2441823002
Cr-Commit-Position: refs/heads/master@{#426871}
parent f7af135c
...@@ -330,12 +330,19 @@ bool IsOnWelcomePage(content::WebContents* contents) { ...@@ -330,12 +330,19 @@ bool IsOnWelcomePage(content::WebContents* contents) {
// We have to check both the GetURL() similar to the other checks below, but // 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 // also the original request url because the welcome page we use is a
// redirect. // redirect.
GURL welcome_page(l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL)); // TODO(crbug.com/651465): Remove this once kUseConsolidatedStartupFlow is on
return contents->GetURL() == welcome_page || // by default.
(contents->GetController().GetVisibleEntry() && const GURL deprecated_welcome_page(
contents->GetController() l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL));
.GetVisibleEntry() if (contents->GetURL() == deprecated_welcome_page ||
->GetOriginalRequestURL() == 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. // Show the first run search engine bubble at the first appropriate opportunity.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment