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

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

Issue 1578013002: Reset browser.check_default_browser on update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing line Created 4 years, 11 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/ui/browser_ui_prefs.cc ('k') | chrome/common/pref_names.h » ('j') | 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 9443190fb389a0fbd08a4b9841b19c5d33bbfcce..0f13478f3ca7d9d75a362a8bfc712507776061f2 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -296,12 +296,18 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
return;
}
+ PrefService* prefs = profile->GetPrefs();
+ // Reset preferences if kResetCheckDefaultBrowser is true.
+ if (prefs->GetBoolean(prefs::kResetCheckDefaultBrowser)) {
+ prefs->SetBoolean(prefs::kResetCheckDefaultBrowser, false);
+ prefs->SetBoolean(prefs::kCheckDefaultBrowser, true);
+ }
+
// Check if Chrome is the default browser but do not prompt if:
// - The user said "don't ask me again" on the infobar earlier.
// - The "suppress_default_browser_prompt_for_version" master preference is
// set to the current version.
- bool show_prompt =
- profile->GetPrefs()->GetBoolean(prefs::kCheckDefaultBrowser);
+ bool show_prompt = prefs->GetBoolean(prefs::kCheckDefaultBrowser);
if (show_prompt) {
const std::string disable_version_string =
g_browser_process->local_state()->GetString(
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698