Index: chrome/browser/extensions/api/messaging/native_message_port.cc |
diff --git a/chrome/browser/extensions/api/messaging/native_message_port.cc b/chrome/browser/extensions/api/messaging/native_message_port.cc |
index 8d26d306b144f2f5716cc62c38121c83cb696394..d07bf9711620f8c4599cb820070e380b994352a4 100644 |
--- a/chrome/browser/extensions/api/messaging/native_message_port.cc |
+++ b/chrome/browser/extensions/api/messaging/native_message_port.cc |
@@ -100,9 +100,16 @@ NativeMessagePort::~NativeMessagePort() { |
host_task_runner_->DeleteSoon(FROM_HERE, core_.release()); |
} |
-void NativeMessagePort::DispatchOnMessage( |
- const Message& message, |
- int target_port_id) { |
+bool NativeMessagePort::IsValidPort() { |
+ // The native message port is immediately connected after construction, so it |
+ // is not possible to invalidate the port between construction and connection. |
+ // The return value doesn't matter since native messaging follows a code path |
+ // where IsValidPort() is never called. |
+ NOTREACHED(); |
+ return true; |
+} |
+ |
+void NativeMessagePort::DispatchOnMessage(const Message& message) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
core_->OnMessageFromChrome(message.data); |
} |