| Index: mojo/edk/system/channel.cc
|
| diff --git a/mojo/edk/system/channel.cc b/mojo/edk/system/channel.cc
|
| index 0205312899ff82d1bdbe21072835aee0f69c201a..b63aaeb7901220e3d030f5d769b6e143b218f3f9 100644
|
| --- a/mojo/edk/system/channel.cc
|
| +++ b/mojo/edk/system/channel.cc
|
| @@ -20,8 +20,7 @@
|
| Channel::Channel(embedder::PlatformSupport* platform_support)
|
| : platform_support_(platform_support),
|
| is_running_(false),
|
| - is_shutting_down_(false),
|
| - channel_manager_(nullptr) {
|
| + is_shutting_down_(false) {
|
| }
|
|
|
| bool Channel::Init(scoped_ptr<RawChannel> raw_channel) {
|
| @@ -40,15 +39,6 @@
|
|
|
| is_running_ = true;
|
| return true;
|
| -}
|
| -
|
| -void Channel::SetChannelManager(ChannelManager* channel_manager) {
|
| - DCHECK(channel_manager);
|
| -
|
| - base::AutoLock locker(lock_);
|
| - DCHECK(!is_shutting_down_);
|
| - DCHECK(!channel_manager_);
|
| - channel_manager_ = channel_manager;
|
| }
|
|
|
| void Channel::Shutdown() {
|
| @@ -72,7 +62,8 @@
|
| size_t num_live = 0;
|
| size_t num_zombies = 0;
|
| for (IdToEndpointMap::iterator it = to_destroy.begin();
|
| - it != to_destroy.end(); ++it) {
|
| + it != to_destroy.end();
|
| + ++it) {
|
| if (it->second.get()) {
|
| num_live++;
|
| it->second->OnDisconnect();
|
| @@ -89,7 +80,6 @@
|
| void Channel::WillShutdownSoon() {
|
| base::AutoLock locker(lock_);
|
| is_shutting_down_ = true;
|
| - channel_manager_ = nullptr;
|
| }
|
|
|
| // Note: |endpoint| being a |scoped_refptr| makes this function safe, since it
|
| @@ -130,7 +120,8 @@
|
|
|
| if (!is_bootstrap) {
|
| if (!SendControlMessage(
|
| - MessageInTransit::kSubtypeChannelAttachAndRunEndpoint, local_id,
|
| + MessageInTransit::kSubtypeChannelAttachAndRunEndpoint,
|
| + local_id,
|
| remote_id)) {
|
| HandleLocalError(base::StringPrintf(
|
| "Failed to send message to run remote message pipe endpoint (local "
|
| @@ -194,7 +185,8 @@
|
| }
|
|
|
| if (!SendControlMessage(
|
| - MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpoint, local_id,
|
| + MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpoint,
|
| + local_id,
|
| remote_id)) {
|
| HandleLocalError(base::StringPrintf(
|
| "Failed to send message to remove remote message pipe endpoint (local "
|
| @@ -467,7 +459,8 @@
|
|
|
| if (!SendControlMessage(
|
| MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpointAck,
|
| - local_id, remote_id)) {
|
| + local_id,
|
| + remote_id)) {
|
| HandleLocalError(base::StringPrintf(
|
| "Failed to send message to remove remote message pipe endpoint ack "
|
| "(local ID %u, remote ID %u)",
|
|
|