OLD | NEW |
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 "chrome/browser/first_run/first_run.h" | 9 #include "chrome/browser/first_run/first_run.h" |
10 #include "chrome/browser/prefs/pref_registry_syncable.h" | 10 #include "chrome/browser/prefs/pref_registry_syncable.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // them even though they're only typically controlled via policy. | 149 // them even though they're only typically controlled via policy. |
150 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, | 150 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, |
151 false, | 151 false, |
152 PrefRegistrySyncable::UNSYNCABLE_PREF); | 152 PrefRegistrySyncable::UNSYNCABLE_PREF); |
153 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, | 153 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, |
154 false, | 154 false, |
155 PrefRegistrySyncable::UNSYNCABLE_PREF); | 155 PrefRegistrySyncable::UNSYNCABLE_PREF); |
156 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, | 156 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, |
157 true, | 157 true, |
158 PrefRegistrySyncable::UNSYNCABLE_PREF); | 158 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 159 registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, |
| 160 false, |
| 161 PrefRegistrySyncable::UNSYNCABLE_PREF); |
159 } | 162 } |
160 | 163 |
161 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { | 164 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { |
162 // We need to register the window position pref. | 165 // We need to register the window position pref. |
163 // | 166 // |
164 // TODO(mnissler): Use a separate pref name pointing to a single | 167 // TODO(mnissler): Use a separate pref name pointing to a single |
165 // dictionary instead. Also tracked as http://crbug.com/167256 | 168 // dictionary instead. Also tracked as http://crbug.com/167256 |
166 std::string window_pref(prefs::kBrowserWindowPlacement); | 169 std::string window_pref(prefs::kBrowserWindowPlacement); |
167 window_pref.append("_"); | 170 window_pref.append("_"); |
168 window_pref.append(app_name); | 171 window_pref.append(app_name); |
169 PrefService* prefs = profile->GetPrefs(); | 172 PrefService* prefs = profile->GetPrefs(); |
170 if (!prefs->FindPreference(window_pref.c_str())) { | 173 if (!prefs->FindPreference(window_pref.c_str())) { |
171 // TODO(joi): Do all registration up front. | 174 // TODO(joi): Do all registration up front. |
172 scoped_refptr<PrefRegistrySyncable> registry( | 175 scoped_refptr<PrefRegistrySyncable> registry( |
173 static_cast<PrefRegistrySyncable*>(prefs->DeprecatedGetPrefRegistry())); | 176 static_cast<PrefRegistrySyncable*>(prefs->DeprecatedGetPrefRegistry())); |
174 registry->RegisterDictionaryPref(window_pref.c_str(), | 177 registry->RegisterDictionaryPref(window_pref.c_str(), |
175 PrefRegistrySyncable::UNSYNCABLE_PREF); | 178 PrefRegistrySyncable::UNSYNCABLE_PREF); |
176 } | 179 } |
177 } | 180 } |
178 | 181 |
179 | 182 |
180 } // namespace chrome | 183 } // namespace chrome |
OLD | NEW |