diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 03:53:32 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 03:53:32 +0000 |
commit | 21776be7c1633ff0f10b284e28465d94c3b4b4fa (patch) | |
tree | 412ef55ad3ed205bdcb194439611fd916f1c85aa /chrome/browser/extensions/extension_function.cc | |
parent | bae497a66539b72614b4ed600fca97a92bca5185 (diff) | |
download | chromium_src-21776be7c1633ff0f10b284e28465d94c3b4b4fa.zip chromium_src-21776be7c1633ff0f10b284e28465d94c3b4b4fa.tar.gz chromium_src-21776be7c1633ff0f10b284e28465d94c3b4b4fa.tar.bz2 |
Cleanup: make ExtensionRequestSender manage its IPC responses directly, rather
than going via ExtensionHelper and ExtensionDispatcher. Also make it generate
its request IDs internally.
A cleanup that leads from this is making ExtensionMsg_Reponse a CONTROL message
rather than ROUTED, simplifying some browser-side code.
Review URL: https://chromiumcodereview.appspot.com/10703111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function.cc')
-rw-r--r-- | chrome/browser/extensions/extension_function.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index d8ab5b9..c5f6759 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -121,7 +121,6 @@ bool ExtensionFunction::HasOptionalArgument(size_t index) { void ExtensionFunction::SendResponseImpl(base::ProcessHandle process, IPC::Sender* ipc_sender, - int routing_id, bool success) { DCHECK(ipc_sender); if (bad_message_) { @@ -136,7 +135,7 @@ void ExtensionFunction::SendResponseImpl(base::ProcessHandle process, result_wrapper.Append(result_.release()); ipc_sender->Send(new ExtensionMsg_Response( - routing_id, request_id_, success, result_wrapper, GetError())); + request_id_, success, result_wrapper, GetError())); } void ExtensionFunction::HandleBadMessage(base::ProcessHandle process) { @@ -248,13 +247,11 @@ void UIThreadExtensionFunction::SendResponse(bool success) { SendResponseImpl(render_view_host_->GetProcess()->GetHandle(), render_view_host_, - render_view_host_->GetRoutingID(), success); } } -IOThreadExtensionFunction::IOThreadExtensionFunction() - : routing_id_(-1) { +IOThreadExtensionFunction::IOThreadExtensionFunction() { } IOThreadExtensionFunction::~IOThreadExtensionFunction() { @@ -273,8 +270,7 @@ void IOThreadExtensionFunction::SendResponse(bool success) { if (!ipc_sender()) return; - SendResponseImpl(ipc_sender()->peer_handle(), - ipc_sender(), routing_id_, success); + SendResponseImpl(ipc_sender()->peer_handle(), ipc_sender(), success); } AsyncExtensionFunction::AsyncExtensionFunction() { |