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 8598022: Restrict access to permissions based on extension types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 681
682 // Updates the launch URL and extents for the extension using the given 682 // Updates the launch URL and extents for the extension using the given
683 // |override_url|. 683 // |override_url|.
684 void OverrideLaunchUrl(const GURL& override_url); 684 void OverrideLaunchUrl(const GURL& override_url);
685 685
686 // Returns true if this extension can specify |api|. 686 // Returns true if this extension can specify |api|.
687 bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api, 687 bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api,
688 std::string* error) const; 688 std::string* error) const;
689 bool CanSpecifyComponentOnlyPermission() const; 689 bool CanSpecifyComponentOnlyPermission() const;
690 bool CanSpecifyExperimentalPermission() const; 690 bool CanSpecifyExperimentalPermission() const;
691 bool CanSpecifyPermissionForHostedApp( 691
692 const ExtensionAPIPermission* api) const; 692 // Returns true if the |permission| can be specified by this extension type.
693 bool CanSpecifyPermissionForType(
Aaron Boodman 2011/11/22 09:40:32 It isn't clear to me from just these declarations
jstritar 2011/11/22 15:58:29 Done- just rolled it into CanSpeicfyAPIPermission.
694 const ExtensionAPIPermission* permission) const;
693 695
694 // Checks whether the host |pattern| is allowed for this extension, given API 696 // Checks whether the host |pattern| is allowed for this extension, given API
695 // permissions |permissions|. 697 // permissions |permissions|.
696 bool CanSpecifyHostPermission(const URLPattern& pattern, 698 bool CanSpecifyHostPermission(const URLPattern& pattern,
697 const ExtensionAPIPermissionSet& permissions) const; 699 const ExtensionAPIPermissionSet& permissions) const;
698 700
699 // Cached images for this extension. This should only be touched on the UI 701 // Cached images for this extension. This should only be touched on the UI
700 // thread. 702 // thread.
701 mutable ImageCache image_cache_; 703 mutable ImageCache image_cache_;
702 704
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // only contain the removed permissions. 942 // only contain the removed permissions.
941 const ExtensionPermissionSet* permissions; 943 const ExtensionPermissionSet* permissions;
942 944
943 UpdatedExtensionPermissionsInfo( 945 UpdatedExtensionPermissionsInfo(
944 const Extension* extension, 946 const Extension* extension,
945 const ExtensionPermissionSet* permissions, 947 const ExtensionPermissionSet* permissions,
946 Reason reason); 948 Reason reason);
947 }; 949 };
948 950
949 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 951 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension.cc » ('j') | chrome/common/extensions/extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698