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

Unified Diff: chrome/browser/net/chrome_url_request_context.h

Issue 2808051: Refactored extension privilege enumeration and implemented URLPattern compari... (Closed) Base URL: svn://chrome-svn/chrome/trunk/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.h
===================================================================
--- chrome/browser/net/chrome_url_request_context.h (revision 54542)
+++ chrome/browser/net/chrome_url_request_context.h (working copy)
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
#pragma once
+#include <map>
#include <string>
#include <vector>
@@ -52,14 +53,18 @@
ExtensionInfo(const std::string& name, const FilePath& path,
const std::string& default_locale,
const ExtensionExtent& extent,
+ const ExtensionExtent& effective_host_permissions,
const std::vector<std::string>& api_permissions)
: name(name), path(path), default_locale(default_locale),
- extent(extent), api_permissions(api_permissions) {
+ extent(extent),
+ effective_host_permissions(effective_host_permissions),
+ api_permissions(api_permissions) {
}
const std::string name;
- FilePath path;
- std::string default_locale;
- ExtensionExtent extent;
+ const FilePath path;
+ const std::string default_locale;
+ const ExtensionExtent extent;
+ const ExtensionExtent effective_host_permissions;
std::vector<std::string> api_permissions;
};
@@ -78,6 +83,10 @@
// locale.
std::string GetDefaultLocaleForExtension(const std::string& id);
+ // Gets the effective host permissions for the extension with |id|.
+ ExtensionExtent
+ GetEffectiveHostPermissionsForExtension(const std::string& id);
+
// Determine whether a URL has access to the specified extension permission.
bool CheckURLAccessToExtensionPermission(const GURL& url,
const char* permission_name);
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698