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

Side by Side Diff: ipc/mojo/ipc_channel_mojo.h

Issue 554363004: ChannelMojo: Handle errors in pending message processing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo.cc » ('j') | ipc/mojo/ipc_channel_mojo.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef IPC_IPC_CHANNEL_MOJO_H_ 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_
6 #define IPC_IPC_CHANNEL_MOJO_H_ 6 #define IPC_IPC_CHANNEL_MOJO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void OnPipeClosed(internal::MessagePipeReader* reader); 98 void OnPipeClosed(internal::MessagePipeReader* reader);
99 void OnPipeError(internal::MessagePipeReader* reader); 99 void OnPipeError(internal::MessagePipeReader* reader);
100 void set_peer_pid(base::ProcessId pid) { peer_pid_ = pid; } 100 void set_peer_pid(base::ProcessId pid) { peer_pid_ = pid; }
101 101
102 protected: 102 protected:
103 ChannelMojo(const ChannelHandle& channel_handle, 103 ChannelMojo(const ChannelHandle& channel_handle,
104 Mode mode, 104 Mode mode,
105 Listener* listener, 105 Listener* listener,
106 scoped_refptr<base::TaskRunner> io_thread_task_runner); 106 scoped_refptr<base::TaskRunner> io_thread_task_runner);
107 107
108 // Be virtual for testing.
109 virtual scoped_ptr<internal::MessageReader> CreateMessageReader(
110 mojo::ScopedMessagePipeHandle pipe);
111
108 private: 112 private:
109 struct ChannelInfoDeleter { 113 struct ChannelInfoDeleter {
110 void operator()(mojo::embedder::ChannelInfo* ptr) const; 114 void operator()(mojo::embedder::ChannelInfo* ptr) const;
111 }; 115 };
112 116
113 // ChannelMojo needs to kill its MessagePipeReader in delayed manner 117 // ChannelMojo needs to kill its MessagePipeReader in delayed manner
114 // because the channel wants to kill these readers during the 118 // because the channel wants to kill these readers during the
115 // notifications invoked by them. 119 // notifications invoked by them.
116 typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter; 120 typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter;
117 121
(...skipping 11 matching lines...) Expand all
129 ScopedVector<Message> pending_messages_; 133 ScopedVector<Message> pending_messages_;
130 134
131 base::WeakPtrFactory<ChannelMojo> weak_factory_; 135 base::WeakPtrFactory<ChannelMojo> weak_factory_;
132 136
133 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); 137 DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
134 }; 138 };
135 139
136 } // namespace IPC 140 } // namespace IPC
137 141
138 #endif // IPC_IPC_CHANNEL_MOJO_H_ 142 #endif // IPC_IPC_CHANNEL_MOJO_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo.cc » ('j') | ipc/mojo/ipc_channel_mojo.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698