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

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

Issue 1256473002: Re-enable ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } else { 227 } else {
228 io_runner->PostTask( 228 io_runner->PostTask(
229 FROM_HERE, base::Bind(&mojo::embedder::DestroyChannelOnIOThread, ptr)); 229 FROM_HERE, base::Bind(&mojo::embedder::DestroyChannelOnIOThread, ptr));
230 } 230 }
231 } 231 }
232 232
233 //------------------------------------------------------------------------------ 233 //------------------------------------------------------------------------------
234 234
235 // static 235 // static
236 bool ChannelMojo::ShouldBeUsed() { 236 bool ChannelMojo::ShouldBeUsed() {
237 // TODO(rockot): Investigate performance bottlenecks and hopefully reenable 237 return true;
238 // this at some point. http://crbug.com/500019
239 return false;
240 } 238 }
241 239
242 // static 240 // static
243 scoped_ptr<ChannelMojo> ChannelMojo::Create( 241 scoped_ptr<ChannelMojo> ChannelMojo::Create(
244 scoped_refptr<base::TaskRunner> io_runner, 242 scoped_refptr<base::TaskRunner> io_runner,
245 const ChannelHandle& channel_handle, 243 const ChannelHandle& channel_handle,
246 Mode mode, 244 Mode mode,
247 Listener* listener, 245 Listener* listener,
248 AttachmentBroker* broker) { 246 AttachmentBroker* broker) {
249 switch (mode) { 247 switch (mode) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 if (!ok) { 549 if (!ok) {
552 LOG(ERROR) << "Failed to add new Mojo handle."; 550 LOG(ERROR) << "Failed to add new Mojo handle.";
553 return MOJO_RESULT_UNKNOWN; 551 return MOJO_RESULT_UNKNOWN;
554 } 552 }
555 } 553 }
556 554
557 return MOJO_RESULT_OK; 555 return MOJO_RESULT_OK;
558 } 556 }
559 557
560 } // namespace IPC 558 } // 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