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

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

Issue 852113002: Remove RawChannel::Init() and Channel::Init() failure cases. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « mojo/edk/embedder/embedder.cc ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class MOJO_SYSTEM_IMPL_EXPORT Channel 53 class MOJO_SYSTEM_IMPL_EXPORT Channel
54 : public base::RefCountedThreadSafe<Channel>, 54 : public base::RefCountedThreadSafe<Channel>,
55 public RawChannel::Delegate { 55 public RawChannel::Delegate {
56 public: 56 public:
57 // |platform_support| (typically owned by |Core|) must remain alive until 57 // |platform_support| (typically owned by |Core|) must remain alive until
58 // after |Shutdown()| is called. 58 // after |Shutdown()| is called.
59 explicit Channel(embedder::PlatformSupport* platform_support); 59 explicit Channel(embedder::PlatformSupport* platform_support);
60 60
61 // This must be called on the creation thread before any other methods are 61 // This must be called on the creation thread before any other methods are
62 // called, and before references to this object are given to any other 62 // called, and before references to this object are given to any other
63 // threads. |raw_channel| should be uninitialized. Returns true on success. On 63 // threads. |raw_channel| should be uninitialized.
64 // failure, no other methods should be called (including |Shutdown()|). 64 void Init(scoped_ptr<RawChannel> raw_channel);
65 bool Init(scoped_ptr<RawChannel> raw_channel);
66 65
67 // Sets the channel manager associated with this channel. This should be set 66 // Sets the channel manager associated with this channel. This should be set
68 // at most once and only called before |WillShutdownSoon()| (and 67 // at most once and only called before |WillShutdownSoon()| (and
69 // |Shutdown()|). 68 // |Shutdown()|).
70 void SetChannelManager(ChannelManager* channel_manager); 69 void SetChannelManager(ChannelManager* channel_manager);
71 70
72 // This must be called on the creation thread before destruction (which can 71 // This must be called on the creation thread before destruction (which can
73 // happen on any thread). 72 // happen on any thread).
74 void Shutdown(); 73 void Shutdown();
75 74
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // if/when we wrap). 251 // if/when we wrap).
253 RemoteChannelEndpointIdGenerator remote_id_generator_; 252 RemoteChannelEndpointIdGenerator remote_id_generator_;
254 253
255 DISALLOW_COPY_AND_ASSIGN(Channel); 254 DISALLOW_COPY_AND_ASSIGN(Channel);
256 }; 255 };
257 256
258 } // namespace system 257 } // namespace system
259 } // namespace mojo 258 } // namespace mojo
260 259
261 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ 260 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder.cc ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698