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

Unified Diff: extensions/renderer/api_bindings_system.cc

Issue 2947843004: [Extensions Bindings] Introduce BindingAccessChecker (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.h ('k') | extensions/renderer/binding_access_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_bindings_system.cc
diff --git a/extensions/renderer/api_bindings_system.cc b/extensions/renderer/api_bindings_system.cc
index 7ba0b024b52a8d8d2a32d90ab85046529e9cd786..11011903e7de4f31ead43ec423f64df01c36843b 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -15,7 +15,7 @@ APIBindingsSystem::APIBindingsSystem(
const binding::RunJSFunction& call_js,
const binding::RunJSFunctionSync& call_js_sync,
const GetAPISchemaMethod& get_api_schema,
- const APIBinding::AvailabilityCallback& is_available,
+ const BindingAccessChecker::AvailabilityCallback& is_available,
const APIRequestHandler::SendRequestMethod& send_request,
const APIEventHandler::EventListenersChangedMethod& event_listeners_changed,
APILastError last_error)
@@ -23,10 +23,10 @@ APIBindingsSystem::APIBindingsSystem(
base::Unretained(this))),
request_handler_(send_request, call_js, std::move(last_error)),
event_handler_(call_js, call_js_sync, event_listeners_changed),
+ access_checker_(is_available),
call_js_(call_js),
call_js_sync_(call_js_sync),
- get_api_schema_(get_api_schema),
- is_available_(is_available) {}
+ get_api_schema_(get_api_schema) {}
APIBindingsSystem::~APIBindingsSystem() {}
@@ -72,8 +72,8 @@ std::unique_ptr<APIBinding> APIBindingsSystem::CreateNewAPIBinding(
api_name, function_definitions, type_definitions, event_definitions,
property_definitions,
base::Bind(&APIBindingsSystem::CreateCustomType, base::Unretained(this)),
- is_available_, std::move(hooks), &type_reference_map_, &request_handler_,
- &event_handler_);
+ std::move(hooks), &type_reference_map_, &request_handler_,
+ &event_handler_, &access_checker_);
}
void APIBindingsSystem::InitializeType(const std::string& type_name) {
« no previous file with comments | « extensions/renderer/api_bindings_system.h ('k') | extensions/renderer/binding_access_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698