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

Unified Diff: extensions/renderer/api_bindings_system.cc

Issue 2610743002: [Extensions Bindings] Make function definitions optional for an API. (Closed)
Patch Set: comment fix, unit test for empty API Created 3 years, 11 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_binding_unittest.cc ('k') | no next file » | 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 5db72a0235820aedf249eff43f77c974d0ec20b1..e09e8de9d9fe8656a44a9fd37cfa373e310eb19a 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -45,9 +45,8 @@ std::unique_ptr<APIBinding> APIBindingsSystem::CreateNewAPIBinding(
const base::DictionaryValue& api_schema = get_api_schema_.Run(api_name);
const base::ListValue* function_definitions = nullptr;
- CHECK(api_schema.GetList("functions", &function_definitions));
+ api_schema.GetList("functions", &function_definitions);
const base::ListValue* type_definitions = nullptr;
- // Type definitions might not exist for the given API.
api_schema.GetList("types", &type_definitions);
const base::ListValue* event_definitions = nullptr;
api_schema.GetList("events", &event_definitions);
@@ -66,7 +65,7 @@ std::unique_ptr<APIBinding> APIBindingsSystem::CreateNewAPIBinding(
}
return base::MakeUnique<APIBinding>(
- api_name, *function_definitions, type_definitions, event_definitions,
+ api_name, function_definitions, type_definitions, event_definitions,
base::Bind(&APIBindingsSystem::OnAPICall, base::Unretained(this)),
std::move(hooks), &type_reference_map_);
}
« no previous file with comments | « extensions/renderer/api_binding_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698