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

Side by Side Diff: mojo/edk/system/channel.h

Issue 2065453004: Always leak the Mojo parent pipe handle on child process shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MOJO_EDK_SYSTEM_CHANNEL_H_ 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_H_
6 #define MOJO_EDK_SYSTEM_CHANNEL_H_ 6 #define MOJO_EDK_SYSTEM_CHANNEL_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 virtual void Start() = 0; 218 virtual void Start() = 0;
219 219
220 // Stop processing I/O events. 220 // Stop processing I/O events.
221 virtual void ShutDownImpl() = 0; 221 virtual void ShutDownImpl() = 0;
222 222
223 // Queues an outgoing message on the Channel. This message will either 223 // Queues an outgoing message on the Channel. This message will either
224 // eventually be written or will fail to write and trigger 224 // eventually be written or will fail to write and trigger
225 // Delegate::OnChannelError. 225 // Delegate::OnChannelError.
226 virtual void Write(MessagePtr message) = 0; 226 virtual void Write(MessagePtr message) = 0;
227 227
228 // Causes the platform handle to leak when this channel is shut down instead
229 // of closing it.
230 virtual void LeakHandle() = 0;
231
228 protected: 232 protected:
229 explicit Channel(Delegate* delegate); 233 explicit Channel(Delegate* delegate);
230 virtual ~Channel(); 234 virtual ~Channel();
231 235
232 // Called by the implementation when it wants somewhere to stick data. 236 // Called by the implementation when it wants somewhere to stick data.
233 // |*buffer_capacity| may be set by the caller to indicate the desired buffer 237 // |*buffer_capacity| may be set by the caller to indicate the desired buffer
234 // size. If 0, a sane default size will be used instead. 238 // size. If 0, a sane default size will be used instead.
235 // 239 //
236 // Returns the address of a buffer which can be written to, and indicates its 240 // Returns the address of a buffer which can be written to, and indicates its
237 // actual capacity in |*buffer_capacity|. 241 // actual capacity in |*buffer_capacity|.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 Delegate* delegate_; 283 Delegate* delegate_;
280 const std::unique_ptr<ReadBuffer> read_buffer_; 284 const std::unique_ptr<ReadBuffer> read_buffer_;
281 285
282 DISALLOW_COPY_AND_ASSIGN(Channel); 286 DISALLOW_COPY_AND_ASSIGN(Channel);
283 }; 287 };
284 288
285 } // namespace edk 289 } // namespace edk
286 } // namespace mojo 290 } // namespace mojo
287 291
288 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ 292 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc ('k') | mojo/edk/system/channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698