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 "content/common/np_channel_base.h" | 5 #include "content/common/np_channel_base.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 if (mode_ == IPC::Channel::MODE_SERVER) | 134 if (mode_ == IPC::Channel::MODE_SERVER) |
135 CHECK_NE(-1, channel_->GetClientFileDescriptor()); | 135 CHECK_NE(-1, channel_->GetClientFileDescriptor()); |
136 #endif | 136 #endif |
137 | 137 |
138 channel_valid_ = true; | 138 channel_valid_ = true; |
139 return true; | 139 return true; |
140 } | 140 } |
141 | 141 |
142 bool NPChannelBase::Send(IPC::Message* message) { | 142 bool NPChannelBase::Send(IPC::Message* message) { |
143 if (!channel_.get()) { | 143 if (!channel_.get()) { |
144 LOG(ERROR) << "Channel is NULL; dropping message"; | 144 VLOG(1) << "Channel is NULL; dropping message"; |
145 delete message; | 145 delete message; |
146 return false; | 146 return false; |
147 } | 147 } |
148 | 148 |
149 if (send_unblocking_only_during_unblock_dispatch_ && | 149 if (send_unblocking_only_during_unblock_dispatch_ && |
150 in_unblock_dispatch_ == 0 && | 150 in_unblock_dispatch_ == 0 && |
151 message->is_sync()) { | 151 message->is_sync()) { |
152 message->set_unblock(false); | 152 message->set_unblock(false); |
153 } | 153 } |
154 | 154 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, | 294 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, |
295 NPObject* object) { | 295 NPObject* object) { |
296 DCHECK(object != NULL); | 296 DCHECK(object != NULL); |
297 stub_map_.erase(object); | 297 stub_map_.erase(object); |
298 } | 298 } |
299 | 299 |
300 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { | 300 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { |
301 proxy_map_.erase(route_id); | 301 proxy_map_.erase(route_id); |
302 } | 302 } |
OLD | NEW |