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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 1268853003: Move webstorePrivate DelegatedInstall functions into new dashboardPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 5 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/browser/extension_function_histogram_value.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index fb5d507348b8687139e447855d8752ab2bf9612f..d4d0aa091d5839fed6009cf3bd3d269fcfe5a4c1 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -1155,12 +1155,15 @@ void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
case Feature::UNSPECIFIED_CONTEXT:
case Feature::WEB_PAGE_CONTEXT:
case Feature::BLESSED_WEB_PAGE_CONTEXT:
- // Web page context; it's too expensive to run the full bindings code.
- // Hard-code that the app and webstore APIs are available...
+ // Hard-code registration of any APIs that are exposed to webpage-like
+ // contexts, because it's too expensive to run the full bindings code.
+ // All of the same permission checks will still apply.
if (context->GetAvailability("app").is_available())
RegisterBinding("app", context);
if (context->GetAvailability("webstore").is_available())
RegisterBinding("webstore", context);
+ if (context->GetAvailability("dashboardPrivate").is_available())
+ RegisterBinding("dashboardPrivate", context);
if (IsRuntimeAvailableToContext(context))
RegisterBinding("runtime", context);
UpdateContentCapabilities(context);
@@ -1176,10 +1179,7 @@ void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
FeatureProvider::GetAPIFeatures();
const std::vector<std::string>& apis =
api_feature_provider->GetAllFeatureNames();
- for (std::vector<std::string>::const_iterator it = apis.begin();
- it != apis.end();
- ++it) {
- const std::string& api_name = *it;
+ for (const std::string& api_name : apis) {
Feature* feature = api_feature_provider->GetFeature(api_name);
DCHECK(feature);
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698