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

Unified Diff: chrome/browser/extensions/extension_function_dispatcher.cc

Issue 6794035: Move dispatching and sending of the last extension specific messages out of TabContents and Rende... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Index: chrome/browser/extensions/extension_function_dispatcher.cc
===================================================================
--- chrome/browser/extensions/extension_function_dispatcher.cc (revision 80315)
+++ chrome/browser/extensions/extension_function_dispatcher.cc (working copy)
@@ -486,7 +486,9 @@
if (!service->ExtensionBindingsAllowed(function->source_url()) ||
!extension->HasApiPermission(function->name())) {
- render_view_host_->BlockExtensionRequest(function->request_id());
+ render_view_host_->Send(new ExtensionMsg_Response(
+ render_view_host_->routing_id(), function->request_id(), false,
+ std::string(), "Access to extension API denied."));
return;
}
@@ -498,15 +500,17 @@
function->Run();
} else {
- render_view_host_->SendExtensionResponse(function->request_id(), false,
- std::string(), QuotaLimitHeuristic::kGenericOverQuotaError);
+ render_view_host_->Send(new ExtensionMsg_Response(
+ render_view_host_->routing_id(), function->request_id(), false,
+ std::string(), QuotaLimitHeuristic::kGenericOverQuotaError));
}
}
void ExtensionFunctionDispatcher::SendResponse(ExtensionFunction* function,
bool success) {
- render_view_host_->SendExtensionResponse(function->request_id(), success,
- function->GetResult(), function->GetError());
+ render_view_host_->Send(new ExtensionMsg_Response(
+ render_view_host_->routing_id(), function->request_id(), success,
+ function->GetResult(), function->GetError()));
}
void ExtensionFunctionDispatcher::HandleBadMessage(ExtensionFunction* api) {

Powered by Google App Engine
This is Rietveld 408576698