Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / browser_ui_prefs.cc
blob9edc021bad8feff554806154c8e537a97b03055e
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/browser_ui_prefs.h"
7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "chrome/browser/first_run/first_run.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/pref_names.h"
13 #include "components/pref_registry/pref_registry_syncable.h"
14 #include "components/translate/core/common/translate_pref_names.h"
16 namespace chrome {
18 void RegisterBrowserPrefs(PrefRegistrySimple* registry) {
19 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
20 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
21 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption,
22 first_run::FIRST_RUN_BUBBLE_DONT_SHOW);
25 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
26 registry->RegisterBooleanPref(
27 prefs::kHomePageIsNewTabPage,
28 true,
29 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
30 registry->RegisterBooleanPref(
31 prefs::kShowHomeButton,
32 false,
33 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
34 #if defined(OS_MACOSX)
35 // This really belongs in platform code, but there's no good place to
36 // initialize it between the time when the AppController is created
37 // (where there's no profile) and the time the controller gets another
38 // crack at the start of the main event loop. By that time,
39 // StartupBrowserCreator has already created the browser window, and it's too
40 // late: we need the pref to be already initialized. Doing it here also saves
41 // us from having to hard-code pref registration in the several unit tests
42 // that use this preference.
43 registry->RegisterBooleanPref(
44 prefs::kShowUpdatePromotionInfoBar,
45 true,
46 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
47 #endif
48 registry->RegisterBooleanPref(
49 prefs::kDeleteBrowsingHistory,
50 true,
51 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
52 registry->RegisterBooleanPref(
53 prefs::kDeleteDownloadHistory,
54 true,
55 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
56 registry->RegisterBooleanPref(
57 prefs::kDeleteCache,
58 true,
59 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
60 registry->RegisterBooleanPref(
61 prefs::kDeleteCookies,
62 true,
63 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
64 registry->RegisterBooleanPref(
65 prefs::kDeletePasswords,
66 false,
67 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
68 registry->RegisterBooleanPref(
69 prefs::kDeleteFormData,
70 false,
71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
72 registry->RegisterBooleanPref(
73 prefs::kDeleteHostedAppsData,
74 false,
75 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
76 registry->RegisterIntegerPref(
77 prefs::kDeleteTimePeriod,
79 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
80 registry->RegisterInt64Pref(
81 prefs::kLastClearBrowsingDataTime,
83 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
84 registry->RegisterIntegerPref(prefs::kModuleConflictBubbleShown,
86 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
87 registry->RegisterBooleanPref(
88 prefs::kCheckDefaultBrowser,
89 true,
90 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
91 registry->RegisterBooleanPref(
92 prefs::kWebAppCreateOnDesktop,
93 true,
94 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
95 registry->RegisterBooleanPref(
96 prefs::kWebAppCreateInAppsMenu,
97 true,
98 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
99 registry->RegisterBooleanPref(
100 prefs::kWebAppCreateInQuickLaunchBar,
101 true,
102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
103 registry->RegisterBooleanPref(
104 prefs::kEnableTranslate,
105 true,
106 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
107 registry->RegisterStringPref(
108 prefs::kCloudPrintEmail,
109 std::string(),
110 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
111 registry->RegisterBooleanPref(
112 prefs::kCloudPrintProxyEnabled,
113 true,
114 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
115 registry->RegisterBooleanPref(
116 prefs::kCloudPrintSubmitEnabled,
117 true,
118 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
119 registry->RegisterBooleanPref(
120 prefs::kDevToolsDisabled,
121 false,
122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
123 registry->RegisterDictionaryPref(
124 prefs::kBrowserWindowPlacement,
125 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
126 registry->RegisterDictionaryPref(
127 prefs::kBrowserWindowPlacementPopup,
128 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
129 registry->RegisterDictionaryPref(
130 prefs::kAppWindowPlacement,
131 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
132 registry->RegisterBooleanPref(
133 prefs::kImportAutofillFormData,
134 true,
135 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
136 registry->RegisterBooleanPref(
137 prefs::kImportBookmarks,
138 true,
139 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
140 registry->RegisterBooleanPref(
141 prefs::kImportHistory,
142 true,
143 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
144 registry->RegisterBooleanPref(
145 prefs::kImportHomepage,
146 true,
147 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
148 registry->RegisterBooleanPref(
149 prefs::kImportSavedPasswords,
150 true,
151 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
152 registry->RegisterBooleanPref(
153 prefs::kImportSearchEngine,
154 true,
155 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
156 registry->RegisterBooleanPref(
157 prefs::kEnableDoNotTrack,
158 false,
159 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
160 #if defined(ENABLE_WEBRTC)
161 registry->RegisterBooleanPref(
162 prefs::kWebRTCMultipleRoutesEnabled,
163 true,
164 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
165 #endif
167 // Dictionaries to keep track of default tasks in the file browser.
168 registry->RegisterDictionaryPref(
169 prefs::kDefaultTasksByMimeType,
170 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
171 registry->RegisterDictionaryPref(
172 prefs::kDefaultTasksBySuffix,
173 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
175 // We need to register the type of these preferences in order to query
176 // them even though they're only typically controlled via policy.
177 registry->RegisterBooleanPref(
178 prefs::kPluginsAllowOutdated,
179 false,
180 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
181 registry->RegisterBooleanPref(
182 prefs::kPluginsAlwaysAuthorize,
183 false,
184 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
185 registry->RegisterBooleanPref(
186 prefs::kClearPluginLSODataEnabled,
187 true,
188 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
189 registry->RegisterBooleanPref(
190 prefs::kHideWebStoreIcon,
191 false,
192 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
193 #if !defined(OS_MACOSX)
194 registry->RegisterBooleanPref(
195 prefs::kFullscreenAllowed,
196 true,
197 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
198 #endif
201 } // namespace chrome