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 1de7c5924e99766959de190646670e9243c0807b..e794df32c62096d9b1a5f6789e5885dbfbc7100f 100644 |
--- a/chrome/browser/extensions/api/messaging/message_service.cc |
+++ b/chrome/browser/extensions/api/messaging/message_service.cc |
@@ -372,9 +372,9 @@ void MessageService::OpenChannelToNativeApp( |
PrefService* pref_service = profile->GetPrefs(); |
// Verify that the host is not blocked by policies. |
- NativeMessageProcessHost::PolicyPermission policy_permission = |
- NativeMessageProcessHost::IsHostAllowed(pref_service, native_app_name); |
- if (policy_permission == NativeMessageProcessHost::DISALLOW) { |
+ NativeMessageHost::PolicyPermission policy_permission = |
+ NativeMessageHost::IsHostAllowed(pref_service, native_app_name); |
+ if (policy_permission == NativeMessageHost::DISALLOW) { |
DispatchOnDisconnect(source, receiver_port_id, kProhibitedByPoliciesError); |
return; |
} |
@@ -388,22 +388,22 @@ void MessageService::OpenChannelToNativeApp( |
content::RenderWidgetHost::FromID(source_process_id, source_routing_id)-> |
GetView()->GetNativeView(); |
- scoped_ptr<NativeMessageProcessHost> native_process = |
- NativeMessageProcessHost::Create( |
- native_view, |
- base::WeakPtr<NativeMessageProcessHost::Client>( |
- weak_factory_.GetWeakPtr()), |
- source_extension_id, native_app_name, receiver_port_id, |
- policy_permission == NativeMessageProcessHost::ALLOW_ALL); |
+ scoped_ptr<NativeMessageHost> native_host = NativeMessageHost::Create( |
+ native_view, |
+ base::WeakPtr<NativeMessageHost::Client>(weak_factory_.GetWeakPtr()), |
+ source_extension_id, |
+ native_app_name, |
+ receiver_port_id, |
+ policy_permission == NativeMessageHost::ALLOW_ALL); |
// Abandon the channel. |
- if (!native_process.get()) { |
+ if (!native_host.get()) { |
LOG(ERROR) << "Failed to create native process."; |
DispatchOnDisconnect( |
source, receiver_port_id, kReceivingEndDoesntExistError); |
return; |
} |
- channel->receiver.reset(new NativeMessagePort(native_process.release())); |
+ channel->receiver.reset(new NativeMessagePort(native_host.release())); |
// Keep the opener alive until the channel is closed. |
channel->opener->IncrementLazyKeepaliveCount(); |
@@ -563,7 +563,7 @@ void MessageService::PostMessage(int source_port_id, const Message& message) { |
DispatchMessage(source_port_id, iter->second, message); |
} |
-void MessageService::PostMessageFromNativeProcess(int port_id, |
+void MessageService::PostMessageFromNative(int port_id, |
const std::string& message) { |
PostMessage(port_id, Message(message, false /* user_gesture */)); |
} |