Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 EXTENSIONS_COMMON_EXTENSION_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ |
| 6 #define EXTENSIONS_COMMON_EXTENSION_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 | 146 |
| 147 // Unused - this flag has been moved to ExtensionPrefs. | 147 // Unused - this flag has been moved to ExtensionPrefs. |
| 148 IS_EPHEMERAL = 1 << 9, | 148 IS_EPHEMERAL = 1 << 9, |
| 149 | 149 |
| 150 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should | 150 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should |
| 151 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are | 151 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are |
| 152 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). | 152 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). |
| 153 WAS_INSTALLED_BY_OEM = 1 << 10, | 153 WAS_INSTALLED_BY_OEM = 1 << 10, |
| 154 | 154 |
| 155 // |WAS_INSTALLED_BY_CUSTODIAN| means this extension was installed by the | 155 // |WAS_INSTALLED_BY_CUSTODIAN| means this extension was installed by the |
| 156 // custodian of a supervised user. | 156 // custodian of a supervised user. |
|
Marc Treib
2016/06/17 08:56:54
I'd remove this comment now - if someone cares, th
mamir
2016/06/17 16:12:55
Done.
| |
| 157 WAS_INSTALLED_BY_CUSTODIAN = 1 << 11, | 157 // DEPRECATED:: WAS_INSTALLED_BY_CUSTODIAN is now stored as a pref instead. |
| 158 // WAS_INSTALLED_BY_CUSTODIAN= 1 << 11, | |
| 158 | 159 |
| 159 // |MAY_BE_UNTRUSTED| indicates that this extension came from a potentially | 160 // |MAY_BE_UNTRUSTED| indicates that this extension came from a potentially |
| 160 // unsafe source (e.g., sideloaded from a local CRX file via the Windows | 161 // unsafe source (e.g., sideloaded from a local CRX file via the Windows |
| 161 // registry). Such extensions may be subjected to additional constraints | 162 // registry). Such extensions may be subjected to additional constraints |
| 162 // before they are fully installed and enabled. | 163 // before they are fully installed and enabled. |
| 163 MAY_BE_UNTRUSTED = 1 << 12, | 164 MAY_BE_UNTRUSTED = 1 << 12, |
| 164 | 165 |
| 165 // When adding new flags, make sure to update kInitFromValueFlagBits. | 166 // When adding new flags, make sure to update kInitFromValueFlagBits. |
| 166 }; | 167 }; |
| 167 | 168 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 325 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
| 325 bool may_be_untrusted() const { | 326 bool may_be_untrusted() const { |
| 326 return (creation_flags_ & MAY_BE_UNTRUSTED) != 0; | 327 return (creation_flags_ & MAY_BE_UNTRUSTED) != 0; |
| 327 } | 328 } |
| 328 bool was_installed_by_default() const { | 329 bool was_installed_by_default() const { |
| 329 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 330 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
| 330 } | 331 } |
| 331 bool was_installed_by_oem() const { | 332 bool was_installed_by_oem() const { |
| 332 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; | 333 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; |
| 333 } | 334 } |
| 334 bool was_installed_by_custodian() const { | |
| 335 return (creation_flags_ & WAS_INSTALLED_BY_CUSTODIAN) != 0; | |
| 336 } | |
| 337 | 335 |
| 338 // Type-related queries. | 336 // Type-related queries. |
| 339 bool is_app() const; | 337 bool is_app() const; |
| 340 bool is_platform_app() const; | 338 bool is_platform_app() const; |
| 341 bool is_hosted_app() const; | 339 bool is_hosted_app() const; |
| 342 bool is_legacy_packaged_app() const; | 340 bool is_legacy_packaged_app() const; |
| 343 bool is_extension() const; | 341 bool is_extension() const; |
| 344 bool is_shared_module() const; | 342 bool is_shared_module() const; |
| 345 bool is_theme() const; | 343 bool is_theme() const; |
| 346 | 344 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 566 const PermissionSet& permissions; | 564 const PermissionSet& permissions; |
| 567 | 565 |
| 568 UpdatedExtensionPermissionsInfo(const Extension* extension, | 566 UpdatedExtensionPermissionsInfo(const Extension* extension, |
| 569 const PermissionSet& permissions, | 567 const PermissionSet& permissions, |
| 570 Reason reason); | 568 Reason reason); |
| 571 }; | 569 }; |
| 572 | 570 |
| 573 } // namespace extensions | 571 } // namespace extensions |
| 574 | 572 |
| 575 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 573 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |