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

Side by Side Diff: ipc/ipc_channel_mojo.cc

Issue 2476883002: Remove obsolete methods from IPC::Channel and related classes. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_mojo.h" 5 #include "ipc/ipc_channel_mojo.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 void ChannelMojo::OnMessageReceived(const Message& message) { 398 void ChannelMojo::OnMessageReceived(const Message& message) {
399 TRACE_EVENT2("ipc,toplevel", "ChannelMojo::OnMessageReceived", 399 TRACE_EVENT2("ipc,toplevel", "ChannelMojo::OnMessageReceived",
400 "class", IPC_MESSAGE_ID_CLASS(message.type()), 400 "class", IPC_MESSAGE_ID_CLASS(message.type()),
401 "line", IPC_MESSAGE_ID_LINE(message.type())); 401 "line", IPC_MESSAGE_ID_LINE(message.type()));
402 listener_->OnMessageReceived(message); 402 listener_->OnMessageReceived(message);
403 if (message.dispatch_error()) 403 if (message.dispatch_error())
404 listener_->OnBadMessageReceived(message); 404 listener_->OnBadMessageReceived(message);
405 } 405 }
406 406
407 #if defined(OS_POSIX) && !defined(OS_NACL_SFI)
408 int ChannelMojo::GetClientFileDescriptor() const {
409 return -1;
410 }
411
412 base::ScopedFD ChannelMojo::TakeClientFileDescriptor() {
413 return base::ScopedFD(GetClientFileDescriptor());
414 }
415 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI)
416
417 // static 407 // static
418 MojoResult ChannelMojo::ReadFromMessageAttachmentSet( 408 MojoResult ChannelMojo::ReadFromMessageAttachmentSet(
419 Message* message, 409 Message* message,
420 base::Optional<std::vector<mojom::SerializedHandlePtr>>* handles) { 410 base::Optional<std::vector<mojom::SerializedHandlePtr>>* handles) {
421 DCHECK(!*handles); 411 DCHECK(!*handles);
422 412
423 MojoResult result = MOJO_RESULT_OK; 413 MojoResult result = MOJO_RESULT_OK;
424 if (!message->HasAttachments()) 414 if (!message->HasAttachments())
425 return result; 415 return result;
426 416
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 479 }
490 480
491 void ChannelMojo::GetGenericRemoteAssociatedInterface( 481 void ChannelMojo::GetGenericRemoteAssociatedInterface(
492 const std::string& name, 482 const std::string& name,
493 mojo::ScopedInterfaceEndpointHandle handle) { 483 mojo::ScopedInterfaceEndpointHandle handle) {
494 if (message_reader_) 484 if (message_reader_)
495 message_reader_->GetRemoteInterface(name, std::move(handle)); 485 message_reader_->GetRemoteInterface(name, std::move(handle));
496 } 486 }
497 487
498 } // namespace IPC 488 } // namespace IPC
OLDNEW
« ipc/ipc_channel.h ('K') | « ipc/ipc_channel_mojo.h ('k') | ipc/ipc_channel_nacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698