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/browser/renderer_host/websocket_dispatcher_host.h" | 5 #include "content/browser/renderer_host/websocket_dispatcher_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/numerics/safe_conversions.h" | 15 #include "base/numerics/safe_conversions.h" |
16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
18 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 18 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
19 #include "content/browser/child_process_security_policy_impl.h" | |
20 #include "content/browser/renderer_host/websocket_host.h" | 19 #include "content/browser/renderer_host/websocket_host.h" |
| 20 #include "content/browser/shared/child_process_security_policy_helper.h" |
21 #include "content/common/websocket_messages.h" | 21 #include "content/common/websocket_messages.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Many methods defined in this file return a WebSocketHostState enum | 27 // Many methods defined in this file return a WebSocketHostState enum |
28 // value. Make WebSocketHostState visible at file scope so it doesn't have to be | 28 // value. Make WebSocketHostState visible at file scope so it doesn't have to be |
29 // fully-qualified every time. | 29 // fully-qualified every time. |
30 typedef WebSocketDispatcherHost::WebSocketHostState WebSocketHostState; | 30 typedef WebSocketDispatcherHost::WebSocketHostState WebSocketHostState; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 num_current_succeeded_connections_ = 0; | 301 num_current_succeeded_connections_ = 0; |
302 | 302 |
303 if (num_pending_connections_ == 0 && | 303 if (num_pending_connections_ == 0 && |
304 num_previous_failed_connections_ == 0 && | 304 num_previous_failed_connections_ == 0 && |
305 num_previous_succeeded_connections_ == 0) { | 305 num_previous_succeeded_connections_ == 0) { |
306 throttling_period_timer_.Stop(); | 306 throttling_period_timer_.Stop(); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 } // namespace content | 310 } // namespace content |
OLD | NEW |