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

Side by Side Diff: chrome/browser/extensions/extension_prefs.cc

Issue 10542023: Disable modifying extensions when in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Improve/fix InitImpl() Created 8 years, 6 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/extensions/extension_prefs.h" 5 #include "chrome/browser/extensions/extension_prefs.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/admin_policy.h" 10 #include "chrome/browser/extensions/admin_policy.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 return ReadExtensionPrefBoolean(extension_id, kPrefAppNotificationDisbaled); 636 return ReadExtensionPrefBoolean(extension_id, kPrefAppNotificationDisbaled);
637 } 637 }
638 638
639 void ExtensionPrefs::SetAppNotificationDisabled( 639 void ExtensionPrefs::SetAppNotificationDisabled(
640 const std::string& extension_id, bool value) { 640 const std::string& extension_id, bool value) {
641 DCHECK(Extension::IdIsValid(extension_id)); 641 DCHECK(Extension::IdIsValid(extension_id));
642 UpdateExtensionPref(extension_id, kPrefAppNotificationDisbaled, 642 UpdateExtensionPref(extension_id, kPrefAppNotificationDisbaled,
643 Value::CreateBooleanValue(value)); 643 Value::CreateBooleanValue(value));
644 } 644 }
645 645
646 std::string ExtensionPrefs::GetPolicyProviderName() const { 646 std::string ExtensionPrefs::GetDebugPolicyProviderName() const {
647 return "admin policy black/white/forcelist, via the ExtensionPrefs"; 647 return "admin policy black/white/forcelist, via the ExtensionPrefs";
648 } 648 }
649 649
650 bool ExtensionPrefs::UserMayLoad(const extensions::Extension* extension, 650 bool ExtensionPrefs::UserMayLoad(const extensions::Extension* extension,
651 string16* error) const { 651 string16* error) const {
652 652
653 const base::ListValue* blacklist = 653 const base::ListValue* blacklist =
654 prefs_->GetList(prefs::kExtensionInstallDenyList); 654 prefs_->GetList(prefs::kExtensionInstallDenyList);
655 const base::ListValue* whitelist = 655 const base::ListValue* whitelist =
656 prefs_->GetList(prefs::kExtensionInstallAllowList); 656 prefs_->GetList(prefs::kExtensionInstallAllowList);
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 PrefService::UNSYNCABLE_PREF); 1948 PrefService::UNSYNCABLE_PREF);
1949 prefs->RegisterInt64Pref(prefs::kLastExtensionsUpdateCheck, 1949 prefs->RegisterInt64Pref(prefs::kLastExtensionsUpdateCheck,
1950 0, // default value 1950 0, // default value
1951 PrefService::UNSYNCABLE_PREF); 1951 PrefService::UNSYNCABLE_PREF);
1952 prefs->RegisterInt64Pref(prefs::kNextExtensionsUpdateCheck, 1952 prefs->RegisterInt64Pref(prefs::kNextExtensionsUpdateCheck,
1953 0, // default value 1953 0, // default value
1954 PrefService::UNSYNCABLE_PREF); 1954 PrefService::UNSYNCABLE_PREF);
1955 prefs->RegisterListPref(prefs::kExtensionAllowedInstallSites, 1955 prefs->RegisterListPref(prefs::kExtensionAllowedInstallSites,
1956 PrefService::UNSYNCABLE_PREF); 1956 PrefService::UNSYNCABLE_PREF);
1957 } 1957 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698