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

Unified Diff: extensions/renderer/chrome_setting.h

Issue 2953453002: [Extensions Bindings] Add access checks in custom types (Closed)
Patch Set: lazyboy's Created 3 years, 6 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 | « extensions/renderer/api_bindings_system.cc ('k') | extensions/renderer/chrome_setting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/chrome_setting.h
diff --git a/extensions/renderer/chrome_setting.h b/extensions/renderer/chrome_setting.h
index 11b7dc2c13ad68da769e9b14d5a1a5979f20d92a..76724f11bbd559c0bb0c1b9ea429ea18ea9fb655 100644
--- a/extensions/renderer/chrome_setting.h
+++ b/extensions/renderer/chrome_setting.h
@@ -24,6 +24,7 @@ class Arguments;
namespace extensions {
class APIEventHandler;
class APIRequestHandler;
+class BindingAccessChecker;
// The custom implementation of the ChromeSetting type exposed to APIs.
class ChromeSetting final : public gin::Wrappable<ChromeSetting> {
@@ -31,12 +32,14 @@ class ChromeSetting final : public gin::Wrappable<ChromeSetting> {
~ChromeSetting() override;
// Creates a ChromeSetting object for the given property.
- static v8::Local<v8::Object> Create(v8::Isolate* isolate,
- const std::string& property_name,
- const base::ListValue* property_values,
- APIRequestHandler* request_handler,
- APIEventHandler* event_handler,
- APITypeReferenceMap* type_refs);
+ static v8::Local<v8::Object> Create(
+ v8::Isolate* isolate,
+ const std::string& property_name,
+ const base::ListValue* property_values,
+ APIRequestHandler* request_handler,
+ APIEventHandler* event_handler,
+ APITypeReferenceMap* type_refs,
+ const BindingAccessChecker* access_checker);
static gin::WrapperInfo kWrapperInfo;
@@ -47,6 +50,7 @@ class ChromeSetting final : public gin::Wrappable<ChromeSetting> {
ChromeSetting(APIRequestHandler* request_handler,
APIEventHandler* event_handler,
const APITypeReferenceMap* type_refs,
+ const BindingAccessChecker* access_checker,
const std::string& pref_name,
const base::DictionaryValue& argument_spec);
@@ -68,6 +72,8 @@ class ChromeSetting final : public gin::Wrappable<ChromeSetting> {
const APITypeReferenceMap* type_refs_;
+ const BindingAccessChecker* const access_checker_;
+
// The name of the preference this ChromeSetting is managing.
std::string pref_name_;
« no previous file with comments | « extensions/renderer/api_bindings_system.cc ('k') | extensions/renderer/chrome_setting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698