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

Side by Side Diff: chrome/browser/ui/browser_ui_prefs.cc

Issue 11859029: Add a policy to hide the Web Store on new tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use 'invisible' CSS class name Created 7 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 | Annotate | Revision Log
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 "chrome/browser/first_run/first_run.h" 7 #include "chrome/browser/first_run/first_run.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // them even though they're only typically controlled via policy. 144 // them even though they're only typically controlled via policy.
145 prefs->RegisterBooleanPref(prefs::kPluginsAllowOutdated, 145 prefs->RegisterBooleanPref(prefs::kPluginsAllowOutdated,
146 false, 146 false,
147 PrefServiceSyncable::UNSYNCABLE_PREF); 147 PrefServiceSyncable::UNSYNCABLE_PREF);
148 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, 148 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize,
149 false, 149 false,
150 PrefServiceSyncable::UNSYNCABLE_PREF); 150 PrefServiceSyncable::UNSYNCABLE_PREF);
151 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, 151 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled,
152 true, 152 true,
153 PrefServiceSyncable::UNSYNCABLE_PREF); 153 PrefServiceSyncable::UNSYNCABLE_PREF);
154 prefs->RegisterBooleanPref(prefs::kHideWebStoreIcon,
155 false,
156 PrefServiceSyncable::UNSYNCABLE_PREF);
154 } 157 }
155 158
156 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { 159 void RegisterAppPrefs(const std::string& app_name, Profile* profile) {
157 // We need to register the window position pref. 160 // We need to register the window position pref.
158 // 161 //
159 // TODO(mnissler): Use a separate pref name pointing to a single 162 // TODO(mnissler): Use a separate pref name pointing to a single
160 // dictionary instead. Also tracked as http://crbug.com/167256 163 // dictionary instead. Also tracked as http://crbug.com/167256
161 std::string window_pref(prefs::kBrowserWindowPlacement); 164 std::string window_pref(prefs::kBrowserWindowPlacement);
162 window_pref.append("_"); 165 window_pref.append("_");
163 window_pref.append(app_name); 166 window_pref.append(app_name);
164 PrefServiceSyncable* prefs = profile->GetPrefs(); 167 PrefServiceSyncable* prefs = profile->GetPrefs();
165 if (!prefs->FindPreference(window_pref.c_str())) { 168 if (!prefs->FindPreference(window_pref.c_str())) {
166 // TODO(joi): Switch to official way of registering local prefs 169 // TODO(joi): Switch to official way of registering local prefs
167 // for this class, i.e. in a function called from 170 // for this class, i.e. in a function called from
168 // browser_prefs::RegisterUserPrefs. 171 // browser_prefs::RegisterUserPrefs.
169 prefs->RegisterDictionaryPref(window_pref.c_str(), 172 prefs->RegisterDictionaryPref(window_pref.c_str(),
170 PrefServiceSyncable::UNSYNCABLE_PREF); 173 PrefServiceSyncable::UNSYNCABLE_PREF);
171 } 174 }
172 } 175 }
173 176
174 177
175 } // namespace chrome 178 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698