| Index: chrome/browser/devtools/devtools_network_conditions.cc
|
| diff --git a/chrome/browser/devtools/devtools_network_conditions.cc b/chrome/browser/devtools/devtools_network_conditions.cc
|
| index aa656c7b8200fcb979d998b3a90cfe4ee889be92..59e06b879c1f54f94fed26d1c4273f46a736a5c4 100644
|
| --- a/chrome/browser/devtools/devtools_network_conditions.cc
|
| +++ b/chrome/browser/devtools/devtools_network_conditions.cc
|
| @@ -7,8 +7,10 @@
|
| #include "url/gurl.h"
|
|
|
| DevToolsNetworkConditions::DevToolsNetworkConditions(
|
| - const std::vector<std::string>& domains)
|
| - : domains_(domains){
|
| + const std::vector<std::string>& domains,
|
| + double maximal_throughput)
|
| + : domains_(domains),
|
| + maximal_throughput_(maximal_throughput) {
|
| }
|
|
|
| DevToolsNetworkConditions::~DevToolsNetworkConditions() {
|
| @@ -26,5 +28,9 @@ bool DevToolsNetworkConditions::HasMatchingDomain(const GURL& url) const {
|
| }
|
|
|
| bool DevToolsNetworkConditions::IsOffline() const {
|
| - return true;
|
| + return maximal_throughput_ == 0.0;
|
| +}
|
| +
|
| +bool DevToolsNetworkConditions::IsThrottling() const {
|
| + return maximal_throughput_ != 0.0;
|
| }
|
|
|