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

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

Issue 665993002: ChannelMojo: Add ChannelMojo::CanBeUsed() to enable it incrementally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « ipc/mojo/ipc_channel_mojo.h ('k') | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 //------------------------------------------------------------------------------ 46 //------------------------------------------------------------------------------
47 47
48 void ChannelMojo::ChannelInfoDeleter::operator()( 48 void ChannelMojo::ChannelInfoDeleter::operator()(
49 mojo::embedder::ChannelInfo* ptr) const { 49 mojo::embedder::ChannelInfo* ptr) const {
50 mojo::embedder::DestroyChannelOnIOThread(ptr); 50 mojo::embedder::DestroyChannelOnIOThread(ptr);
51 } 51 }
52 52
53 //------------------------------------------------------------------------------ 53 //------------------------------------------------------------------------------
54 54
55 // static 55 // static
56 bool ChannelMojo::ShouldBeUsed() {
57 // TODO(morrita): Turn this on for a set of platforms.
58 return false;
59 }
60
61 // static
56 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, 62 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate,
57 const ChannelHandle& channel_handle, 63 const ChannelHandle& channel_handle,
58 Mode mode, 64 Mode mode,
59 Listener* listener) { 65 Listener* listener) {
60 return make_scoped_ptr( 66 return make_scoped_ptr(
61 new ChannelMojo(delegate, channel_handle, mode, listener)); 67 new ChannelMojo(delegate, channel_handle, mode, listener));
62 } 68 }
63 69
64 // static 70 // static
65 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( 71 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory(
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 281
276 fdset->CommitAll(); 282 fdset->CommitAll();
277 } 283 }
278 284
279 return MOJO_RESULT_OK; 285 return MOJO_RESULT_OK;
280 } 286 }
281 287
282 #endif // defined(OS_POSIX) && !defined(OS_NACL) 288 #endif // defined(OS_POSIX) && !defined(OS_NACL)
283 289
284 } // namespace IPC 290 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/mojo/ipc_channel_mojo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698