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

Side by Side Diff: chrome/browser/ui/browser_ui_prefs.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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/startup/default_browser_prompt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_ui_prefs.h" 5 #include "chrome/browser/ui/browser_ui_prefs.h"
6 6
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/first_run/first_run.h" 11 #include "chrome/browser/first_run/first_run.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "components/pref_registry/pref_registry_syncable.h" 14 #include "components/pref_registry/pref_registry_syncable.h"
15 #include "components/translate/core/common/translate_pref_names.h" 15 #include "components/translate/core/common/translate_pref_names.h"
16 #include "content/public/common/webrtc_ip_handling_policy.h" 16 #include "content/public/common/webrtc_ip_handling_policy.h"
17 17
18 #if defined(OS_WIN)
19 #include "base/win/windows_version.h"
20 #endif
21
18 namespace chrome { 22 namespace chrome {
19 23
20 void RegisterBrowserPrefs(PrefRegistrySimple* registry) { 24 void RegisterBrowserPrefs(PrefRegistrySimple* registry) {
21 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 25 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
22 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true); 26 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
23 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption, 27 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption,
24 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); 28 first_run::FIRST_RUN_BUBBLE_DONT_SHOW);
25 } 29 }
26 30
27 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { 31 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 prefs::kDeleteHostedAppsData, 76 prefs::kDeleteHostedAppsData,
73 false, 77 false,
74 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 78 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
75 registry->RegisterIntegerPref( 79 registry->RegisterIntegerPref(
76 prefs::kDeleteTimePeriod, 80 prefs::kDeleteTimePeriod,
77 0, 81 0,
78 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 82 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
79 registry->RegisterInt64Pref(prefs::kLastClearBrowsingDataTime, 0); 83 registry->RegisterInt64Pref(prefs::kLastClearBrowsingDataTime, 0);
80 registry->RegisterIntegerPref(prefs::kModuleConflictBubbleShown, 0); 84 registry->RegisterIntegerPref(prefs::kModuleConflictBubbleShown, 0);
81 registry->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); 85 registry->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true);
86 bool reset_check_default = false;
87 #if defined(OS_WIN)
88 reset_check_default = base::win::GetVersion() >= base::win::VERSION_WIN10;
89 #endif
90 registry->RegisterBooleanPref(prefs::kResetCheckDefaultBrowser,
91 reset_check_default);
82 registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); 92 registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
83 registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); 93 registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
84 registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); 94 registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
85 registry->RegisterBooleanPref( 95 registry->RegisterBooleanPref(
86 prefs::kEnableTranslate, 96 prefs::kEnableTranslate,
87 true, 97 true,
88 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 98 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
89 registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); 99 registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
90 registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true); 100 registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
91 registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true); 101 registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); 134 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
125 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false); 135 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
126 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true); 136 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true);
127 registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false); 137 registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false);
128 #if !defined(OS_MACOSX) 138 #if !defined(OS_MACOSX)
129 registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true); 139 registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true);
130 #endif 140 #endif
131 } 141 }
132 142
133 } // namespace chrome 143 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/default_browser_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698