OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/devtools/devtools_network_interceptor.h" | 5 #include "chrome/browser/devtools/devtools_network_interceptor.h" |
6 | 6 |
| 7 #include <algorithm> |
7 #include <limits> | 8 #include <limits> |
8 | 9 |
9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
10 #include "chrome/browser/devtools/devtools_network_conditions.h" | 11 #include "chrome/browser/devtools/devtools_network_conditions.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 int64_t kPacketSize = 1500; | 15 int64_t kPacketSize = 1500; |
15 | 16 |
16 } // namespace | 17 } // namespace |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 ArmTimer(now); | 235 ArmTimer(now); |
235 } | 236 } |
236 | 237 |
237 bool DevToolsNetworkInterceptor::ShouldFail() { | 238 bool DevToolsNetworkInterceptor::ShouldFail() { |
238 return conditions_->offline(); | 239 return conditions_->offline(); |
239 } | 240 } |
240 | 241 |
241 bool DevToolsNetworkInterceptor::ShouldThrottle() { | 242 bool DevToolsNetworkInterceptor::ShouldThrottle() { |
242 return conditions_->IsThrottling(); | 243 return conditions_->IsThrottling(); |
243 } | 244 } |
OLD | NEW |