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

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

Issue 13971005: Basic multi-module support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix copyright for presubmit Created 7 years, 7 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/chrome_manifest_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/utf_string_conversions.h" 7 #include "base/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 "chrome/common/extensions/manifest.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // kExtensionAllowedTypesMap in configuration_policy_handler_list.cc. 73 // kExtensionAllowedTypesMap in configuration_policy_handler_list.cc.
74 switch (extension->GetType()) { 74 switch (extension->GetType()) {
75 case Manifest::TYPE_UNKNOWN: 75 case Manifest::TYPE_UNKNOWN:
76 break; 76 break;
77 case Manifest::TYPE_EXTENSION: 77 case Manifest::TYPE_EXTENSION:
78 case Manifest::TYPE_THEME: 78 case Manifest::TYPE_THEME:
79 case Manifest::TYPE_USER_SCRIPT: 79 case Manifest::TYPE_USER_SCRIPT:
80 case Manifest::TYPE_HOSTED_APP: 80 case Manifest::TYPE_HOSTED_APP:
81 case Manifest::TYPE_LEGACY_PACKAGED_APP: 81 case Manifest::TYPE_LEGACY_PACKAGED_APP:
82 case Manifest::TYPE_PLATFORM_APP: 82 case Manifest::TYPE_PLATFORM_APP:
83 case Manifest::TYPE_SHARED_MODULE:
83 base::FundamentalValue type_value(extension->GetType()); 84 base::FundamentalValue type_value(extension->GetType());
84 if (allowed_types && 85 if (allowed_types &&
85 allowed_types->Find(type_value) == allowed_types->end()) 86 allowed_types->Find(type_value) == allowed_types->end())
86 return ReturnLoadError(extension, error); 87 return ReturnLoadError(extension, error);
87 break; 88 break;
88 } 89 }
89 90
90 // Check the whitelist/forcelist first. 91 // Check the whitelist/forcelist first.
91 base::StringValue id_value(extension->id()); 92 base::StringValue id_value(extension->id());
92 if ((whitelist && whitelist->Find(id_value) != whitelist->end()) || 93 if ((whitelist && whitelist->Find(id_value) != whitelist->end()) ||
(...skipping 11 matching lines...) Expand all
104 bool UserMayModifySettings(const Extension* extension, string16* error) { 105 bool UserMayModifySettings(const Extension* extension, string16* error) {
105 return ManagementPolicyImpl(extension, error, true); 106 return ManagementPolicyImpl(extension, error, true);
106 } 107 }
107 108
108 bool MustRemainEnabled(const Extension* extension, string16* error) { 109 bool MustRemainEnabled(const Extension* extension, string16* error) {
109 return ManagementPolicyImpl(extension, error, false); 110 return ManagementPolicyImpl(extension, error, false);
110 } 111 }
111 112
112 } // namespace 113 } // namespace
113 } // namespace 114 } // namespace
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/chrome_manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698