summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 23:53:52 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 23:53:52 +0000
commit8a7ad8bcfa38b3c1de9beb1e3cf9a896ccf4842f (patch)
tree4e12c8d7ae070006bd96fb29030a45c8686ee1b3 /chrome/renderer
parenta28e0e48a6d0f1e8b25a45a8e6d7089c276f3c44 (diff)
downloadchromium_src-8a7ad8bcfa38b3c1de9beb1e3cf9a896ccf4842f.zip
chromium_src-8a7ad8bcfa38b3c1de9beb1e3cf9a896ccf4842f.tar.gz
chromium_src-8a7ad8bcfa38b3c1de9beb1e3cf9a896ccf4842f.tar.bz2
Don't send the receiver function name in the ExternalHostBindings::ForwardMessageToExternalHost
CPP binding exposed for sending messages from Chrome to an external host, Review URL: http://codereview.chromium.org/27125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/external_host_bindings.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/renderer/external_host_bindings.cc b/chrome/renderer/external_host_bindings.cc
index 4808a30..0f0ad92 100644
--- a/chrome/renderer/external_host_bindings.cc
+++ b/chrome/renderer/external_host_bindings.cc
@@ -14,19 +14,17 @@ void ExternalHostBindings::BindMethods() {
void ExternalHostBindings::ForwardMessageToExternalHost(
const CppArgumentList& args, CppVariant* result) {
- // We expect at least a string message identifier, and optionally take
- // an object parameter. If we get anything else we bail.
- if (args.size() < 2)
+ // We only accept a string message identifier.
+ if (args.size() != 1)
return;
// Args should be strings.
- if (!args[0].isString() && !args[1].isString())
+ if (!args[0].isString())
return;
- const std::string& receiver = args[0].ToString();
- const std::string& message = args[1].ToString();
+ const std::string& message = args[0].ToString();
sender()->Send(new ViewHostMsg_ForwardMessageToExternalHost(
- routing_id(), receiver, message));
+ routing_id(), message));
}