OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/websocket_dispatcher.h" | 5 #include "content/child/websocket_dispatcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 default: | 48 default: |
49 return false; | 49 return false; |
50 } | 50 } |
51 | 51 |
52 WebSocketBridge* bridge = GetBridge(msg.routing_id(), msg.type()); | 52 WebSocketBridge* bridge = GetBridge(msg.routing_id(), msg.type()); |
53 if (!bridge) | 53 if (!bridge) |
54 return true; | 54 return true; |
55 return bridge->OnMessageReceived(msg); | 55 return bridge->OnMessageReceived(msg); |
56 } | 56 } |
57 | 57 |
58 WebSocketBridge* WebSocketDispatcher::GetBridge(int channel_id, uint32 type) { | 58 WebSocketBridge* WebSocketDispatcher::GetBridge(int channel_id, uint32_t type) { |
59 std::map<int, WebSocketBridge*>::iterator iter = bridges_.find(channel_id); | 59 std::map<int, WebSocketBridge*>::iterator iter = bridges_.find(channel_id); |
60 if (iter == bridges_.end()) { | 60 if (iter == bridges_.end()) { |
61 DVLOG(1) << "No bridge for channel_id=" << channel_id | 61 DVLOG(1) << "No bridge for channel_id=" << channel_id |
62 << ", type=" << type; | 62 << ", type=" << type; |
63 return NULL; | 63 return NULL; |
64 } | 64 } |
65 return iter->second; | 65 return iter->second; |
66 } | 66 } |
67 | 67 |
68 } // namespace content | 68 } // namespace content |
OLD | NEW |