| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // extension should be errors rather than warnings. | 155 // extension should be errors rather than warnings. |
| 156 ERROR_ON_PRIVATE_KEY = 1 << 6, | 156 ERROR_ON_PRIVATE_KEY = 1 << 6, |
| 157 | 157 |
| 158 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was | 158 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was |
| 159 // created. | 159 // created. |
| 160 WAS_INSTALLED_BY_DEFAULT = 1 << 7, | 160 WAS_INSTALLED_BY_DEFAULT = 1 << 7, |
| 161 | 161 |
| 162 // Unused - was part of an abandoned experiment. | 162 // Unused - was part of an abandoned experiment. |
| 163 REQUIRE_PERMISSIONS_CONSENT = 1 << 8, | 163 REQUIRE_PERMISSIONS_CONSENT = 1 << 8, |
| 164 | 164 |
| 165 // |IS_EPHEMERAL| identifies ephemeral apps (experimental), which are not | 165 // Unused - this flag has been moved to ExtensionPrefs. |
| 166 // permanently installed. | |
| 167 IS_EPHEMERAL = 1 << 9, | 166 IS_EPHEMERAL = 1 << 9, |
| 168 | 167 |
| 169 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should | 168 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should |
| 170 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are | 169 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are |
| 171 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). | 170 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). |
| 172 WAS_INSTALLED_BY_OEM = 1 << 10, | 171 WAS_INSTALLED_BY_OEM = 1 << 10, |
| 173 }; | 172 }; |
| 174 | 173 |
| 175 static scoped_refptr<Extension> Create(const base::FilePath& path, | 174 static scoped_refptr<Extension> Create(const base::FilePath& path, |
| 176 Manifest::Location location, | 175 Manifest::Location location, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 324 } |
| 326 int creation_flags() const { return creation_flags_; } | 325 int creation_flags() const { return creation_flags_; } |
| 327 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 326 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
| 328 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 327 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
| 329 bool was_installed_by_default() const { | 328 bool was_installed_by_default() const { |
| 330 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 329 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
| 331 } | 330 } |
| 332 bool was_installed_by_oem() const { | 331 bool was_installed_by_oem() const { |
| 333 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; | 332 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; |
| 334 } | 333 } |
| 335 bool is_ephemeral() const { return (creation_flags_ & IS_EPHEMERAL) != 0; } | |
| 336 | 334 |
| 337 // App-related. | 335 // App-related. |
| 338 bool is_app() const; | 336 bool is_app() const; |
| 339 bool is_platform_app() const; | 337 bool is_platform_app() const; |
| 340 bool is_hosted_app() const; | 338 bool is_hosted_app() const; |
| 341 bool is_legacy_packaged_app() const; | 339 bool is_legacy_packaged_app() const; |
| 342 bool is_extension() const; | 340 bool is_extension() const; |
| 343 bool can_be_incognito_enabled() const; | 341 bool can_be_incognito_enabled() const; |
| 344 | 342 |
| 345 void AddWebExtentPattern(const URLPattern& pattern); | 343 void AddWebExtentPattern(const URLPattern& pattern); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 546 |
| 549 UpdatedExtensionPermissionsInfo( | 547 UpdatedExtensionPermissionsInfo( |
| 550 const Extension* extension, | 548 const Extension* extension, |
| 551 const PermissionSet* permissions, | 549 const PermissionSet* permissions, |
| 552 Reason reason); | 550 Reason reason); |
| 553 }; | 551 }; |
| 554 | 552 |
| 555 } // namespace extensions | 553 } // namespace extensions |
| 556 | 554 |
| 557 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 555 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |