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

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

Issue 23257005: Move Feature and Manifest to top-level extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/admin_policy.h" 5 #include "chrome/browser/extensions/admin_policy.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/common/extensions/manifest.h" 9 #include "extensions/common/manifest.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 12
13 namespace { 13 namespace {
14 14
15 bool ManagementPolicyImpl(const extensions::Extension* extension, 15 bool ManagementPolicyImpl(const extensions::Extension* extension,
16 string16* error, 16 string16* error,
17 bool modifiable_value) { 17 bool modifiable_value) {
18 bool modifiable = 18 bool modifiable =
19 extension->location() != extensions::Manifest::COMPONENT && 19 extension->location() != extensions::Manifest::COMPONENT &&
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 bool UserMayModifySettings(const Extension* extension, string16* error) { 111 bool UserMayModifySettings(const Extension* extension, string16* error) {
112 return ManagementPolicyImpl(extension, error, true); 112 return ManagementPolicyImpl(extension, error, true);
113 } 113 }
114 114
115 bool MustRemainEnabled(const Extension* extension, string16* error) { 115 bool MustRemainEnabled(const Extension* extension, string16* error) {
116 return ManagementPolicyImpl(extension, error, false); 116 return ManagementPolicyImpl(extension, error, false);
117 } 117 }
118 118
119 } // namespace 119 } // namespace admin_policy
120 } // namespace 120 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/active_tab_unittest.cc ('k') | chrome/browser/extensions/admin_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698