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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 109683007: Pass a Feature* to IsAnyFeatureAvailableToContext instead of a string name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update extension_api_stub.cc Created 7 years 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 | « chrome/renderer/extensions/chrome_v8_context.cc ('k') | extensions/common/extension_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index 3a21e8ebc1884c4712255f424a69c49af1deb45a..da0d23efd8c8f137c06b0f3e36ff20cdcf2c08db 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -755,7 +755,7 @@ void Dispatcher::AddOrRemoveBindingsForContext(ChromeV8Context* context) {
bool parent_feature_available = false;
for (Feature* parent = api_feature_provider->GetParent(feature);
parent != NULL; parent = api_feature_provider->GetParent(parent)) {
- if (context->IsAnyFeatureAvailableToContext(parent->name())) {
+ if (context->IsAnyFeatureAvailableToContext(*parent)) {
parent_feature_available = true;
break;
}
@@ -763,7 +763,7 @@ void Dispatcher::AddOrRemoveBindingsForContext(ChromeV8Context* context) {
if (parent_feature_available)
continue;
- if (context->IsAnyFeatureAvailableToContext(api_name))
+ if (context->IsAnyFeatureAvailableToContext(*feature))
RegisterBinding(api_name, context);
}
break;
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.cc ('k') | extensions/common/extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698