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

Unified Diff: mojo/edk/system/channel.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/channel.h ('k') | mojo/edk/system/channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.cc
diff --git a/mojo/edk/system/channel.cc b/mojo/edk/system/channel.cc
index 8889919992a9e2949561b7c73c66016040cf3f34..71d7208803e3736dd916362c61b1930ddf490533 100644
--- a/mojo/edk/system/channel.cc
+++ b/mojo/edk/system/channel.cc
@@ -36,7 +36,7 @@ Channel::Channel(embedder::PlatformSupport* platform_support)
channel_manager_(nullptr) {
}
-bool Channel::Init(scoped_ptr<RawChannel> raw_channel) {
+void Channel::Init(scoped_ptr<RawChannel> raw_channel) {
DCHECK(creation_thread_checker_.CalledOnValidThread());
DCHECK(raw_channel);
@@ -44,14 +44,8 @@ bool Channel::Init(scoped_ptr<RawChannel> raw_channel) {
// becomes thread-safe.
DCHECK(!is_running_);
raw_channel_ = raw_channel.Pass();
-
- if (!raw_channel_->Init(this)) {
- raw_channel_.reset();
- return false;
- }
-
+ raw_channel_->Init(this);
is_running_ = true;
- return true;
}
void Channel::SetChannelManager(ChannelManager* channel_manager) {
« no previous file with comments | « mojo/edk/system/channel.h ('k') | mojo/edk/system/channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698