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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_CONDITIONS_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_CONDITIONS_H_
11 #include "base/macros.h"
15 // DevToolsNetworkConditions holds information about desired network conditions.
16 class DevToolsNetworkConditions
{
18 DevToolsNetworkConditions();
19 ~DevToolsNetworkConditions();
21 explicit DevToolsNetworkConditions(bool offline
);
22 DevToolsNetworkConditions(bool offline
,
24 double download_throughput
,
25 double upload_throughput
);
27 bool IsThrottling() const;
29 bool offline() const { return offline_
; }
30 double latency() const { return latency_
; }
31 double download_throughput() const { return download_throughput_
; }
32 double upload_throughput() const { return upload_throughput_
; }
36 const double latency_
;
37 const double download_throughput_
;
38 const double upload_throughput_
;
40 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkConditions
);
43 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_CONDITIONS_H_