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

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

Issue 2823033002: Update documentation of extension vs. app types (Closed)
Patch Set: Tweak extension.h comments Created 3 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 | « no previous file | extensions/docs/extension_and_app_types.md » ('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) 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 bool may_be_untrusted() const { 317 bool may_be_untrusted() const {
318 return (creation_flags_ & MAY_BE_UNTRUSTED) != 0; 318 return (creation_flags_ & MAY_BE_UNTRUSTED) != 0;
319 } 319 }
320 bool was_installed_by_default() const { 320 bool was_installed_by_default() const {
321 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; 321 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
322 } 322 }
323 bool was_installed_by_oem() const { 323 bool was_installed_by_oem() const {
324 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; 324 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0;
325 } 325 }
326 326
327 // Type-related queries. 327 // Type-related queries. These are all mutually exclusive.
328 //
329 // The differences between the types of Extension are documented here:
330 // https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/docs/exten sion_and_app_types.md
331 bool is_platform_app() const; // aka "V2 app", "V2 packaged app"
332 bool is_hosted_app() const; // Hosted app (or bookmark app)
333 bool is_legacy_packaged_app() const; // aka "V1 packaged app"
334 bool is_extension() const; // Regular browser extension, not an app
335 bool is_shared_module() const; // Shared module
336 bool is_theme() const; // Theme
337
338 // True if this is a platform app, hosted app, or legacy packaged app.
328 bool is_app() const; 339 bool is_app() const;
329 bool is_platform_app() const;
330 bool is_hosted_app() const;
331 bool is_legacy_packaged_app() const;
332 bool is_extension() const;
333 bool is_shared_module() const;
334 bool is_theme() const;
335 340
336 void AddWebExtentPattern(const URLPattern& pattern); 341 void AddWebExtentPattern(const URLPattern& pattern);
337 const URLPatternSet& web_extent() const { return extent_; } 342 const URLPatternSet& web_extent() const { return extent_; }
338 343
339 private: 344 private:
340 friend class base::RefCountedThreadSafe<Extension>; 345 friend class base::RefCountedThreadSafe<Extension>;
341 346
342 // Chooses the extension ID for an extension based on a variety of criteria. 347 // Chooses the extension ID for an extension based on a variety of criteria.
343 // The chosen ID will be set in |manifest|. 348 // The chosen ID will be set in |manifest|.
344 static bool InitExtensionID(extensions::Manifest* manifest, 349 static bool InitExtensionID(extensions::Manifest* manifest,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 const PermissionSet& permissions; 560 const PermissionSet& permissions;
556 561
557 UpdatedExtensionPermissionsInfo(const Extension* extension, 562 UpdatedExtensionPermissionsInfo(const Extension* extension,
558 const PermissionSet& permissions, 563 const PermissionSet& permissions,
559 Reason reason); 564 Reason reason);
560 }; 565 };
561 566
562 } // namespace extensions 567 } // namespace extensions
563 568
564 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 569 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/docs/extension_and_app_types.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698