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

Unified Diff: extensions/renderer/content_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/chrome_setting.cc ('k') | extensions/renderer/content_setting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/content_setting.h
diff --git a/extensions/renderer/content_setting.h b/extensions/renderer/content_setting.h
index 8f1dfb9070fd2e7a6c30c58bb938270cf1afa72c..ac3619ca8a2b9905aaa1b66722fdd02994f4e897 100644
--- a/extensions/renderer/content_setting.h
+++ b/extensions/renderer/content_setting.h
@@ -25,6 +25,7 @@ class Arguments;
namespace extensions {
class APIEventHandler;
class APIRequestHandler;
+class BindingAccessChecker;
// The custom implementation of the contentSettings.ContentSetting type exposed
// to APIs.
@@ -33,13 +34,15 @@ class ContentSetting final : public gin::Wrappable<ContentSetting> {
~ContentSetting() override;
// Creates a ContentSetting object for the given property.
- static v8::Local<v8::Object> Create(const binding::RunJSFunction& run_js,
- 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(
+ const binding::RunJSFunction& run_js,
+ 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;
@@ -50,6 +53,7 @@ class ContentSetting final : public gin::Wrappable<ContentSetting> {
ContentSetting(const binding::RunJSFunction& run_js,
APIRequestHandler* request_handler,
const APITypeReferenceMap* type_refs,
+ const BindingAccessChecker* access_checker,
const std::string& pref_name,
const base::DictionaryValue& argument_spec);
@@ -69,6 +73,8 @@ class ContentSetting final : public gin::Wrappable<ContentSetting> {
const APITypeReferenceMap* type_refs_;
+ const BindingAccessChecker* const access_checker_;
+
// The name of the preference this ContentSetting is managing.
std::string pref_name_;
« no previous file with comments | « extensions/renderer/chrome_setting.cc ('k') | extensions/renderer/content_setting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698