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

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

Issue 9317013: Add a centralized mechanism for whitelisting access to extension permissions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comments Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 // an extension that has a browser action and a page action. 700 // an extension that has a browser action and a page action.
701 bool HasMultipleUISurfaces() const; 701 bool HasMultipleUISurfaces() const;
702 702
703 // Updates the launch URL and extents for the extension using the given 703 // Updates the launch URL and extents for the extension using the given
704 // |override_url|. 704 // |override_url|.
705 void OverrideLaunchUrl(const GURL& override_url); 705 void OverrideLaunchUrl(const GURL& override_url);
706 706
707 // Returns true if this extension can specify |api|. 707 // Returns true if this extension can specify |api|.
708 bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api, 708 bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api,
709 string16* error) const; 709 string16* error) const;
710 bool CanSpecifyComponentOnlyPermission() const;
711 bool CanSpecifyExperimentalPermission() const; 710 bool CanSpecifyExperimentalPermission() const;
712 711
713 // Checks whether the host |pattern| is allowed for this extension, given API 712 // Checks whether the host |pattern| is allowed for this extension, given API
714 // permissions |permissions|. 713 // permissions |permissions|.
715 bool CanSpecifyHostPermission(const URLPattern& pattern, 714 bool CanSpecifyHostPermission(const URLPattern& pattern,
716 const ExtensionAPIPermissionSet& permissions) const; 715 const ExtensionAPIPermissionSet& permissions) const;
717 716
718 // Cached images for this extension. This should only be touched on the UI 717 // Cached images for this extension. This should only be touched on the UI
719 // thread. 718 // thread.
720 mutable ImageCache image_cache_; 719 mutable ImageCache image_cache_;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 // only contain the removed permissions. 957 // only contain the removed permissions.
959 const ExtensionPermissionSet* permissions; 958 const ExtensionPermissionSet* permissions;
960 959
961 UpdatedExtensionPermissionsInfo( 960 UpdatedExtensionPermissionsInfo(
962 const Extension* extension, 961 const Extension* extension,
963 const ExtensionPermissionSet* permissions, 962 const ExtensionPermissionSet* permissions,
964 Reason reason); 963 Reason reason);
965 }; 964 };
966 965
967 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 966 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698