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

Side by Side Diff: chrome/common/extensions/extension.h

Issue 9694038: OBSOLETE REVIEW. See http://codereview.chromium.org/10382149/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 location == Extension::EXTERNAL_POLICY_DOWNLOAD; 293 location == Extension::EXTERNAL_POLICY_DOWNLOAD;
294 } 294 }
295 295
296 // Whether extensions with |location| are auto-updatable or not. 296 // Whether extensions with |location| are auto-updatable or not.
297 static inline bool IsAutoUpdateableLocation(Location location) { 297 static inline bool IsAutoUpdateableLocation(Location location) {
298 // Only internal and external extensions can be autoupdated. 298 // Only internal and external extensions can be autoupdated.
299 return location == Extension::INTERNAL || 299 return location == Extension::INTERNAL ||
300 IsExternalLocation(location); 300 IsExternalLocation(location);
301 } 301 }
302 302
303 // Whether extensions with |location| can be uninstalled or not. Policy 303 // Policy-required extensions are silently auto-installed and updated, and
304 // controlled extensions are silently auto-installed and updated, and cannot 304 // cannot be disabled or modified by the user in any way. The same applies
305 // be disabled by the user. The same applies for internal components. 305 // to internal components.
306 static inline bool UserMayDisable(Location location) { 306 // This method is not generally called directly; instead, it is accessed
307 return location != Extension::EXTERNAL_POLICY_DOWNLOAD && 307 // through the ExtensionManagementPolicy held by the ExtensionService.
308 location != Extension::COMPONENT; 308 static inline bool IsRequired(Location location) {
309 return location == Extension::EXTERNAL_POLICY_DOWNLOAD ||
310 location == Extension::COMPONENT;
309 } 311 }
310 312
311 // Whether extensions with |location| should be loaded with strict 313 // Whether extensions with |location| should be loaded with strict
312 // error checking. Strict error checks may flag errors older versions 314 // error checking. Strict error checks may flag errors older versions
313 // of chrome did not detect. To avoid breaking installed extensions, 315 // of chrome did not detect. To avoid breaking installed extensions,
314 // strict checks are disabled unless the location indicates that the 316 // strict checks are disabled unless the location indicates that the
315 // developer is loading the extension, or the extension is a component 317 // developer is loading the extension, or the extension is a component
316 // of chrome. 318 // of chrome.
317 static inline bool ShouldDoStrictErrorChecking(Location location) { 319 static inline bool ShouldDoStrictErrorChecking(Location location) {
318 return location == Extension::LOAD || 320 return location == Extension::LOAD ||
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 // only contain the removed permissions. 1118 // only contain the removed permissions.
1117 const ExtensionPermissionSet* permissions; 1119 const ExtensionPermissionSet* permissions;
1118 1120
1119 UpdatedExtensionPermissionsInfo( 1121 UpdatedExtensionPermissionsInfo(
1120 const Extension* extension, 1122 const Extension* extension,
1121 const ExtensionPermissionSet* permissions, 1123 const ExtensionPermissionSet* permissions,
1122 Reason reason); 1124 Reason reason);
1123 }; 1125 };
1124 1126
1125 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1127 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698