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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Issue 2938503002: DevTools: unify Network & CPU throttling (Closed)
Patch Set: rebaseline Created 3 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: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
index 64bbd62e9c75247ecefe8aa3f3a8b4e667dcb122..ae9c79e9044179bde82804ffa43e28ea8fdb5848 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
@@ -182,23 +182,59 @@ SDK.NetworkManager._MIMETypes = {
'text/vtt': {'texttrack': true},
};
-
-/** @typedef {{download: number, upload: number, latency: number, title: string}} */
+/**
+ * @typedef {{
+ * download: number,
+ * upload: number,
+ * latency: number,
+ * title: string,
+ * description: (string | undefined)
+ * }}
+ **/
SDK.NetworkManager.Conditions;
+
/** @type {!SDK.NetworkManager.Conditions} */
SDK.NetworkManager.NoThrottlingConditions = {
- title: Common.UIString('No throttling'),
+ title: Common.UIString('Online'),
download: -1,
upload: -1,
latency: 0
};
+
/** @type {!SDK.NetworkManager.Conditions} */
SDK.NetworkManager.OfflineConditions = {
title: Common.UIString('Offline'),
download: 0,
upload: 0,
- latency: 0
+ latency: 0,
+ description: Common.UIString('No internet connectivity')
+};
+
+/** @type {!SDK.NetworkManager.Conditions} */
+SDK.NetworkManager.LieFiMobileConditions = {
dgozman 2017/06/28 22:33:09 Put LieFi into a separate patch (so it's easy to r
chenwilliam 2017/06/29 20:34:02 haha ok. Done.
+ title: Common.UIString('LieFi'),
+ download: 100 * 1024 * 1024 / 8,
+ upload: 100 * 1024 * 1024 / 8,
+ latency: 60000,
+ description: Common.UIString('Connected to WiFi but no internet connectivity')
};
+
+/** @type {!SDK.NetworkManager.Conditions} */
+SDK.NetworkManager.Slow3GConditions = {
+ title: Common.UIString('Slow 3G'),
+ download: 500 * 1024 / 8 * .8,
+ upload: 500 * 1024 / 8 * .8,
+ latency: 400 * 5,
+};
+
+/** @type {!SDK.NetworkManager.Conditions} */
+SDK.NetworkManager.Fast3GConditions = {
+ title: Common.UIString('Fast 3G'),
+ download: 1.6 * 1024 * 1024 / 8 * .9,
+ upload: 750 * 1024 / 8 * .9,
+ latency: 150 * 3.75,
+};
+
/** @typedef {{url: string, enabled: boolean}} */
SDK.NetworkManager.BlockedPattern;

Powered by Google App Engine
This is Rietveld 408576698