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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 1748773002: Simplify the default browser infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to position 379825 Created 4 years, 9 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
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index fbf5f2dceba5a9bc963a9245afa33f624b7e2aa5..9f8f88249fef19a0d1d379191e0ca2b3e68cbdd9 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -105,6 +105,7 @@
#include "ui/base/webui/web_ui_util.h"
#if !defined(OS_CHROMEOS)
+#include "chrome/browser/ui/startup/default_browser_prompt.h"
#include "chrome/browser/ui/webui/options/advanced_options_utils.h"
#endif
@@ -1120,8 +1121,7 @@ void BrowserOptionsHandler::BecomeDefaultBrowser(const base::ListValue* args) {
// If the user attempted to make Chrome the default browser, notify
// them when this changes.
- PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
- prefs->SetBoolean(prefs::kCheckDefaultBrowser, true);
+ chrome::ResetDefaultBrowserPrompt(Profile::FromWebUI(web_ui()));
}
void BrowserOptionsHandler::OnDefaultBrowserWorkerFinished(
@@ -1132,8 +1132,7 @@ void BrowserOptionsHandler::OnDefaultBrowserWorkerFinished(
status_string_id = IDS_OPTIONS_DEFAULTBROWSER_DEFAULT;
// Notify the user in the future if Chrome ceases to be the user's chosen
// default browser.
- PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
- prefs->SetBoolean(prefs::kCheckDefaultBrowser, true);
+ chrome::ResetDefaultBrowserPrompt(Profile::FromWebUI(web_ui()));
} else if (state == shell_integration::STATE_NOT_DEFAULT) {
if (shell_integration::CanSetAsDefaultBrowser() ==
shell_integration::SET_DEFAULT_NOT_ALLOWED) {

Powered by Google App Engine
This is Rietveld 408576698