Chromium Code Reviews| 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_conditions.h" | 5 #include "chrome/browser/devtools/devtools_network_conditions.h" |
| 6 | 6 |
| 7 #include "url/gurl.h" | 7 #include "url/gurl.h" |
| 8 | 8 |
| 9 DevToolsNetworkConditions::DevToolsNetworkConditions() | 9 DevToolsNetworkConditions::DevToolsNetworkConditions() |
| 10 : offline_(false), | 10 : offline_(false), |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 : offline_(offline), | 28 : offline_(offline), |
| 29 latency_(latency), | 29 latency_(latency), |
| 30 download_throughput_(download_throughput), | 30 download_throughput_(download_throughput), |
| 31 upload_throughput_(upload_throughput) { | 31 upload_throughput_(upload_throughput) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 DevToolsNetworkConditions::~DevToolsNetworkConditions() { | 34 DevToolsNetworkConditions::~DevToolsNetworkConditions() { |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool DevToolsNetworkConditions::IsThrottling() const { | 37 bool DevToolsNetworkConditions::IsThrottling() const { |
| 38 return (latency_ != 0) || (download_throughput_ != 0.0) || | 38 return !offline_ && ((latency_ != 0) || (download_throughput_ != 0.0) || |
|
dgozman
2015/03/27 11:42:35
Don't you want to remove offline parameter entirel
| |
| 39 (upload_throughput_ != 0); | 39 (upload_throughput_ != 0)); |
| 40 } | 40 } |
| OLD | NEW |