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

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

Issue 1021393002: Re-enable ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
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 #include "ipc/mojo/ipc_channel_mojo.h" 5 #include "ipc/mojo/ipc_channel_mojo.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "ipc/ipc_listener.h" 10 #include "ipc/ipc_listener.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void ChannelMojo::ChannelInfoDeleter::operator()( 185 void ChannelMojo::ChannelInfoDeleter::operator()(
186 mojo::embedder::ChannelInfo* ptr) const { 186 mojo::embedder::ChannelInfo* ptr) const {
187 mojo::embedder::DestroyChannel(ptr, base::Bind(&base::DoNothing), nullptr); 187 mojo::embedder::DestroyChannel(ptr, base::Bind(&base::DoNothing), nullptr);
188 } 188 }
189 189
190 //------------------------------------------------------------------------------ 190 //------------------------------------------------------------------------------
191 191
192 // static 192 // static
193 bool ChannelMojo::ShouldBeUsed() { 193 bool ChannelMojo::ShouldBeUsed() {
194 // TODO(morrita): Remove this if it sticks. 194 // TODO(morrita): Remove this if it sticks.
195 // ChannelMojo is currently disabled due to http://crbug.com/466814. 195 return true;
196 return false;
197 } 196 }
198 197
199 // static 198 // static
200 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, 199 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate,
201 const ChannelHandle& channel_handle, 200 const ChannelHandle& channel_handle,
202 Mode mode, 201 Mode mode,
203 Listener* listener) { 202 Listener* listener) {
204 switch (mode) { 203 switch (mode) {
205 case Channel::MODE_CLIENT: 204 case Channel::MODE_CLIENT:
206 return make_scoped_ptr( 205 return make_scoped_ptr(
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (!ok) { 430 if (!ok) {
432 LOG(ERROR) << "Failed to add new Mojo handle."; 431 LOG(ERROR) << "Failed to add new Mojo handle.";
433 return MOJO_RESULT_UNKNOWN; 432 return MOJO_RESULT_UNKNOWN;
434 } 433 }
435 } 434 }
436 435
437 return MOJO_RESULT_OK; 436 return MOJO_RESULT_OK;
438 } 437 }
439 438
440 } // namespace IPC 439 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698