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

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

Issue 3116011: Revert 56059 - Merge 55103 - Refactored extension privilege enumeration and i... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/common/extensions/extension.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 // Returns true if the extension has the specified API permission. 272 // Returns true if the extension has the specified API permission.
273 bool HasApiPermission(const std::string& permission) const { 273 bool HasApiPermission(const std::string& permission) const {
274 return std::find(api_permissions_.begin(), api_permissions_.end(), 274 return std::find(api_permissions_.begin(), api_permissions_.end(),
275 permission) != api_permissions_.end(); 275 permission) != api_permissions_.end();
276 } 276 }
277 277
278 // Returns the set of hosts that the extension effectively has access to. This 278 // Returns the set of hosts that the extension effectively has access to. This
279 // is used in the permissions UI and is a combination of the hosts accessible 279 // is used in the permissions UI and is a combination of the hosts accessible
280 // through content scripts and the hosts accessible through XHR. 280 // through content scripts and the hosts accessible through XHR.
281 const ExtensionExtent GetEffectiveHostPermissions() const; 281 const std::set<std::string> GetEffectiveHostPermissions() const;
282 282
283 // Whether or not the extension is allowed permission for a URL pattern from 283 // Whether or not the extension is allowed permission for a URL pattern from
284 // the manifest. http, https, and chrome://favicon/ is allowed for all 284 // the manifest. http, https, and chrome://favicon/ is allowed for all
285 // extensions, while component extensions are allowed access to 285 // extensions, while component extensions are allowed access to
286 // chrome://resources. 286 // chrome://resources.
287 bool CanAccessURL(const URLPattern pattern) const; 287 bool CanAccessURL(const URLPattern pattern) const;
288 288
289 // Whether the extension has access to the given URL. 289 // Whether the extension has access to the given URL.
290 bool HasHostPermission(const GURL& url) const; 290 bool HasHostPermission(const GURL& url) const;
291 291
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 scoped_ptr<DictionaryValue> extension_manifest; 603 scoped_ptr<DictionaryValue> extension_manifest;
604 std::string extension_id; 604 std::string extension_id;
605 FilePath extension_path; 605 FilePath extension_path;
606 Extension::Location extension_location; 606 Extension::Location extension_location;
607 607
608 private: 608 private:
609 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); 609 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo);
610 }; 610 };
611 611
612 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 612 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698