| 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..05a71626cd33d7d046a1e4424016b2977969099f 100644
|
| --- a/chrome/browser/ui/startup/default_browser_prompt.cc
|
| +++ b/chrome/browser/ui/startup/default_browser_prompt.cc
|
| @@ -37,6 +37,10 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/vector_icons_public.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "base/win/windows_version.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| // The delegate for the infobar shown when Chrome is not the default browser.
|
| @@ -296,12 +300,21 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
|
| return;
|
| }
|
|
|
| + PrefService* prefs = profile->GetPrefs();
|
| +#if defined(OS_WIN)
|
| + // Reset preferences if kResetCheckDefaultBrowser is true.
|
| + if (base::win::GetVersion() >= base::win::VERSION_WIN10 &&
|
| + prefs->GetBoolean(prefs::kResetCheckDefaultBrowser)) {
|
| + prefs->SetBoolean(prefs::kResetCheckDefaultBrowser, false);
|
| + prefs->SetBoolean(prefs::kCheckDefaultBrowser, true);
|
| + }
|
| +#endif
|
| +
|
| // 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(
|
|
|