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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 11968028: Remove connect message from Native Messaging API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index ae8a50400378706c7baf41aad681e7cc17dd83ef..08b24d004de47f2ffb4c7ee02520e2162c4ba252 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -188,8 +188,7 @@ void MessageService::OpenChannelToNativeApp(
int receiver_port_id,
const std::string& source_extension_id,
const std::string& native_app_name,
- const std::string& channel_name,
- const std::string& connect_message) {
+ const std::string& channel_name) {
content::RenderProcessHost* source =
content::RenderProcessHost::FromID(source_process_id);
if (!source)
@@ -210,19 +209,13 @@ void MessageService::OpenChannelToNativeApp(
channel->opener.reset(new ExtensionMessagePort(source, MSG_ROUTING_CONTROL,
source_extension_id));
- NativeMessageProcessHost::MessageType type =
- channel_name == "chrome.runtime.sendNativeMessage" ?
- NativeMessageProcessHost::TYPE_SEND_MESSAGE_REQUEST :
- NativeMessageProcessHost::TYPE_CONNECT;
-
content::BrowserThread::PostTask(
content::BrowserThread::FILE,
FROM_HERE,
base::Bind(&NativeMessageProcessHost::Create,
base::WeakPtr<NativeMessageProcessHost::Client>(
weak_factory_.GetWeakPtr()),
- native_app_name, connect_message, receiver_port_id,
- type,
+ native_app_name, receiver_port_id,
base::Bind(&MessageService::FinalizeOpenChannelToNativeApp,
weak_factory_.GetWeakPtr(),
receiver_port_id,

Powered by Google App Engine
This is Rietveld 408576698