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

Unified Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 2710073002: Never show the default browser prompt over the first run promos (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/first_run/first_run.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6402a3fef1ce08ba21724cc18b636d1699e695e1 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
+ // 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. See bug crbug.com/693292.
+ if (first_run::IsOnWelcomePage(web_contents))
+ return;
+
DefaultBrowserInfoBarDelegate::Create(
InfoBarService::FromWebContents(web_contents), browser->profile());
}
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698