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

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

Issue 403593002: Improve messaging for shared modules on chrome://extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 6 years, 5 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) 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 int creation_flags() const { return creation_flags_; } 328 int creation_flags() const { return creation_flags_; }
329 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } 329 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
330 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } 330 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
331 bool was_installed_by_default() const { 331 bool was_installed_by_default() const {
332 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; 332 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
333 } 333 }
334 bool was_installed_by_oem() const { 334 bool was_installed_by_oem() const {
335 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; 335 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0;
336 } 336 }
337 337
338 // App-related. 338 // Type-related queries.
339 bool is_app() const; 339 bool is_app() const;
340 bool is_platform_app() const; 340 bool is_platform_app() const;
341 bool is_hosted_app() const; 341 bool is_hosted_app() const;
342 bool is_legacy_packaged_app() const; 342 bool is_legacy_packaged_app() const;
343 bool is_extension() const; 343 bool is_extension() const;
344 bool is_shared_module() const;
345 bool is_theme() const;
346
344 bool can_be_incognito_enabled() const; 347 bool can_be_incognito_enabled() const;
345 348
346 void AddWebExtentPattern(const URLPattern& pattern); 349 void AddWebExtentPattern(const URLPattern& pattern);
347 const URLPatternSet& web_extent() const { return extent_; } 350 const URLPatternSet& web_extent() const { return extent_; }
348 351
349 // Theme-related.
350 bool is_theme() const;
351
352 private: 352 private:
353 friend class base::RefCountedThreadSafe<Extension>; 353 friend class base::RefCountedThreadSafe<Extension>;
354 354
355 // Chooses the extension ID for an extension based on a variety of criteria. 355 // Chooses the extension ID for an extension based on a variety of criteria.
356 // The chosen ID will be set in |manifest|. 356 // The chosen ID will be set in |manifest|.
357 static bool InitExtensionID(extensions::Manifest* manifest, 357 static bool InitExtensionID(extensions::Manifest* manifest,
358 const base::FilePath& path, 358 const base::FilePath& path,
359 const ExtensionId& explicit_id, 359 const ExtensionId& explicit_id,
360 int creation_flags, 360 int creation_flags,
361 base::string16* error); 361 base::string16* error);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 UpdatedExtensionPermissionsInfo( 563 UpdatedExtensionPermissionsInfo(
564 const Extension* extension, 564 const Extension* extension,
565 const PermissionSet* permissions, 565 const PermissionSet* permissions,
566 Reason reason); 566 Reason reason);
567 }; 567 };
568 568
569 } // namespace extensions 569 } // namespace extensions
570 570
571 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 571 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698