summaryrefslogtreecommitdiffstats
path: root/extensions/common/extensions_client.h
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 19:13:26 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 19:13:26 +0000
commit9a83ea0929d9d68ce175ce1ac968f6ebcd91152d (patch)
tree56a91e44f9afca7aa9ff31ede73db256b6fff7c3 /extensions/common/extensions_client.h
parente2bc92bfd8863ee4d9293d6711a516dade843742 (diff)
downloadchromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.zip
chromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.tar.gz
chromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.tar.bz2
Refactor PermissionSet to move chrome-specific host checks to ChromeExtensionsClient.
Combine GetChromeSchemeHosts and GetDistinctHostsForDisplay logic for special permission messages for chrome://favicon into GetSpecialHostPermissionWarnings. BUG=298586 Review URL: https://codereview.chromium.org/25713006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226812 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/extensions_client.h')
-rw-r--r--extensions/common/extensions_client.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/common/extensions_client.h b/extensions/common/extensions_client.h
index 83550a9..eb3ebfe 100644
--- a/extensions/common/extensions_client.h
+++ b/extensions/common/extensions_client.h
@@ -5,12 +5,15 @@
#ifndef EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
#define EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
+#include <set>
#include <string>
namespace extensions {
class FeatureProvider;
+class PermissionMessage;
class PermissionsProvider;
+class URLPatternSet;
// Sets up global state for the extensions system. Should be Set() once in each
// process. This should be implemented by the client of the extensions system.
@@ -26,6 +29,14 @@ class ExtensionsClient {
// Called at startup. Registers the handlers for parsing manifests.
virtual void RegisterManifestHandlers() const = 0;
+ // Takes the list of all hosts and filters out those with special
+ // permission strings. Adds the regular hosts to |new_hosts|,
+ // and adds the special permission messages to |messages|.
+ virtual void FilterHostPermissions(
+ const URLPatternSet& hosts,
+ URLPatternSet* new_hosts,
+ std::set<PermissionMessage>* messages) const = 0;
+
// Return the extensions client.
static ExtensionsClient* Get();