OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 const std::string& name, | 401 const std::string& name, |
402 const GenericAssociatedInterfaceFactory& factory) { | 402 const GenericAssociatedInterfaceFactory& factory) { |
403 base::AutoLock l(channel_lifetime_lock_); | 403 base::AutoLock l(channel_lifetime_lock_); |
404 if (!channel_) { | 404 if (!channel_) { |
405 base::AutoLock l(pending_filters_lock_); | 405 base::AutoLock l(pending_filters_lock_); |
406 pending_interfaces_.emplace_back(name, factory); | 406 pending_interfaces_.emplace_back(name, factory); |
407 return; | 407 return; |
408 } | 408 } |
409 Channel::AssociatedInterfaceSupport* support = | 409 Channel::AssociatedInterfaceSupport* support = |
410 channel_->GetAssociatedInterfaceSupport(); | 410 channel_->GetAssociatedInterfaceSupport(); |
411 DCHECK(support); | 411 if (support) |
412 support->AddGenericAssociatedInterface(name, factory); | 412 support->AddGenericAssociatedInterface(name, factory); |
413 } | 413 } |
414 | 414 |
415 void ChannelProxy::Context::SendFromThisThread(Message* message) { | 415 void ChannelProxy::Context::SendFromThisThread(Message* message) { |
416 base::AutoLock l(channel_lifetime_lock_); | 416 base::AutoLock l(channel_lifetime_lock_); |
417 if (!channel_) | 417 if (!channel_) |
418 return; | 418 return; |
419 DCHECK(channel_->IsSendThreadSafe()); | 419 DCHECK(channel_->IsSendThreadSafe()); |
420 channel_->Send(message); | 420 channel_->Send(message); |
421 } | 421 } |
422 | 422 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 return channel->TakeClientFileDescriptor(); | 665 return channel->TakeClientFileDescriptor(); |
666 } | 666 } |
667 #endif | 667 #endif |
668 | 668 |
669 void ChannelProxy::OnChannelInit() { | 669 void ChannelProxy::OnChannelInit() { |
670 } | 670 } |
671 | 671 |
672 //----------------------------------------------------------------------------- | 672 //----------------------------------------------------------------------------- |
673 | 673 |
674 } // namespace IPC | 674 } // namespace IPC |
OLD | NEW |