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

Side by Side Diff: extensions/common/extensions_client.h

Issue 1213623006: Extensions: Remove PermissionMessage (permission_message.h/cc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kill_getmessages
Patch Set: fix app_shell build, rebase Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
6 #define EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ 6 #define EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 // Create a JSONFeatureProviderSource for a specific feature type, 60 // Create a JSONFeatureProviderSource for a specific feature type,
61 // e.g. "permission". Currently, all features are loaded from 61 // e.g. "permission". Currently, all features are loaded from
62 // JSONFeatureProviderSources. 62 // JSONFeatureProviderSources.
63 // This is used primarily in CreateFeatureProvider, above. 63 // This is used primarily in CreateFeatureProvider, above.
64 virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource( 64 virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource(
65 const std::string& name) const = 0; 65 const std::string& name) const = 0;
66 66
67 // Takes the list of all hosts and filters out those with special 67 // Takes the list of all hosts and filters out those with special
68 // permission strings. Adds the regular hosts to |new_hosts|, 68 // permission strings. Adds the regular hosts to |new_hosts|,
69 // and adds the special permission messages to |messages|.
70 // TODO(sashab): Deprecate this in favour of FilterHostPermissions() below.
71 virtual void FilterHostPermissions(
72 const URLPatternSet& hosts,
73 URLPatternSet* new_hosts,
74 std::set<PermissionMessage>* messages) const = 0;
75
76 // Takes the list of all hosts and filters out those with special
77 // permission strings. Adds the regular hosts to |new_hosts|,
78 // and adds any additional permissions to |permissions|. 69 // and adds any additional permissions to |permissions|.
79 // TODO(sashab): Split this function in two: One to filter out ignored host 70 // TODO(sashab): Split this function in two: One to filter out ignored host
80 // permissions, and one to get permissions for the given hosts. 71 // permissions, and one to get permissions for the given hosts.
81 virtual void FilterHostPermissions(const URLPatternSet& hosts, 72 virtual void FilterHostPermissions(const URLPatternSet& hosts,
82 URLPatternSet* new_hosts, 73 URLPatternSet* new_hosts,
83 PermissionIDSet* permissions) const = 0; 74 PermissionIDSet* permissions) const = 0;
84 75
85 // Replaces the scripting whitelist with |whitelist|. Used in the renderer; 76 // Replaces the scripting whitelist with |whitelist|. Used in the renderer;
86 // only used for testing in the browser process. 77 // only used for testing in the browser process.
87 virtual void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) = 0; 78 virtual void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) = 0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Return the extensions client. 134 // Return the extensions client.
144 static ExtensionsClient* Get(); 135 static ExtensionsClient* Get();
145 136
146 // Initialize the extensions system with this extensions client. 137 // Initialize the extensions system with this extensions client.
147 static void Set(ExtensionsClient* client); 138 static void Set(ExtensionsClient* client);
148 }; 139 };
149 140
150 } // namespace extensions 141 } // namespace extensions
151 142
152 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ 143 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/common/api/sockets/sockets_manifest_permission.cc ('k') | extensions/common/permissions/api_permission.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698