Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: chrome/browser/devtools/devtools_network_conditions.h

Issue 342473004: DevTools: make network conditions emulation scoped (browser) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/devtools_network_conditions.h
diff --git a/chrome/browser/devtools/devtools_network_conditions.h b/chrome/browser/devtools/devtools_network_conditions.h
index 7c9d477fdfe97f5080432a3d21cc84e5519f0359..3f2117fda7f5e5ebbb498e0dcd7282023aa4268b 100644
--- a/chrome/browser/devtools/devtools_network_conditions.h
+++ b/chrome/browser/devtools/devtools_network_conditions.h
@@ -16,24 +16,25 @@ class GURL;
class DevToolsNetworkConditions
: public base::RefCounted<DevToolsNetworkConditions> {
public:
- DevToolsNetworkConditions(const std::vector<std::string>& domains,
- double maximal_throughput);
+ DevToolsNetworkConditions(double latency,
+ double download_throughput,
+ double upload_throughput);
- bool HasMatchingDomain(const GURL& url) const;
bool IsOffline() const;
bool IsThrottling() const;
- double maximal_throughput() const { return maximal_throughput_; }
+ double latency() const { return latency_; }
+ double download_throughput() const { return download_throughput_; }
+ double upload_throughput() const { return upload_throughput_; }
private:
friend class base::RefCounted<DevToolsNetworkConditions>;
virtual ~DevToolsNetworkConditions();
- // List of domains that will be affected by network conditions.
- typedef std::vector<std::string> Domains;
- const Domains domains_;
- const double maximal_throughput_;
+ const double latency_;
+ const double download_throughput_;
+ const double upload_throughput_;
DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkConditions);
};

Powered by Google App Engine
This is Rietveld 408576698