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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 1279863004: Complete SyncMessageFilter initialization after SyncChannel initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eh, vector instead of list 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 | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ipc_channel_proxy.h" 5 #include "ipc/ipc_channel_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 context_->ipc_task_runner()->PostTask( 423 context_->ipc_task_runner()->PostTask(
424 FROM_HERE, base::Bind(&Context::CreateChannel, 424 FROM_HERE, base::Bind(&Context::CreateChannel,
425 context_.get(), Passed(factory.Pass()))); 425 context_.get(), Passed(factory.Pass())));
426 } 426 }
427 427
428 // complete initialization on the background thread 428 // complete initialization on the background thread
429 context_->ipc_task_runner()->PostTask( 429 context_->ipc_task_runner()->PostTask(
430 FROM_HERE, base::Bind(&Context::OnChannelOpened, context_.get())); 430 FROM_HERE, base::Bind(&Context::OnChannelOpened, context_.get()));
431 431
432 did_init_ = true; 432 did_init_ = true;
433 OnChannelInit();
433 } 434 }
434 435
435 void ChannelProxy::Close() { 436 void ChannelProxy::Close() {
436 DCHECK(CalledOnValidThread()); 437 DCHECK(CalledOnValidThread());
437 438
438 // Clear the backpointer to the listener so that any pending calls to 439 // Clear the backpointer to the listener so that any pending calls to
439 // Context::OnDispatchMessage or OnDispatchError will be ignored. It is 440 // Context::OnDispatchMessage or OnDispatchError will be ignored. It is
440 // possible that the channel could be closed while it is receiving messages! 441 // possible that the channel could be closed while it is receiving messages!
441 context_->Clear(); 442 context_->Clear();
442 443
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // Channel must have been created first. 508 // Channel must have been created first.
508 DCHECK(channel) << context_.get()->channel_id_; 509 DCHECK(channel) << context_.get()->channel_id_;
509 return channel->TakeClientFileDescriptor(); 510 return channel->TakeClientFileDescriptor();
510 } 511 }
511 #endif 512 #endif
512 513
513 void ChannelProxy::SetAttachmentBrokerEndpoint(bool is_endpoint) { 514 void ChannelProxy::SetAttachmentBrokerEndpoint(bool is_endpoint) {
514 context()->set_attachment_broker_endpoint(is_endpoint); 515 context()->set_attachment_broker_endpoint(is_endpoint);
515 } 516 }
516 517
518 void ChannelProxy::OnChannelInit() {
519 }
520
517 //----------------------------------------------------------------------------- 521 //-----------------------------------------------------------------------------
518 522
519 } // namespace IPC 523 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698