Chromium Code Reviews| Index: chrome/browser/ui/startup/default_browser_prompt.cc |
| diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc |
| index fb88173530e181057948cf29247e78ac127b10f7..641f616783c5f75df5170647f9b720b7d849109d 100644 |
| --- a/chrome/browser/ui/startup/default_browser_prompt.cc |
| +++ b/chrome/browser/ui/startup/default_browser_prompt.cc |
| @@ -16,6 +16,7 @@ |
| #include "base/version.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/first_run/first_run.h" |
| #include "chrome/browser/infobars/infobar_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| @@ -52,6 +53,14 @@ void ShowPrompt() { |
| if (!web_contents) |
| return; |
| + // Never show the default browser prompt over the first run promos. |
| + // TODO(pmonette): The whole logic that determines when to show the default |
|
Peter Kasting
2017/02/17 00:47:17
Nit: Maybe want an associated bug
Patrick Monette
2017/02/17 01:04:58
Good point. Done.
|
| + // browser prompt is due for a refactor. ShouldShowDefaultBrowserPrompt() |
| + // should be aware of the first run promos and return false instead of |
| + // counting on the early return here. |
| + if (first_run::IsOnWelcomePage(web_contents)) |
| + return; |
| + |
| DefaultBrowserInfoBarDelegate::Create( |
| InfoBarService::FromWebContents(web_contents), browser->profile()); |
| } |