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

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

Issue 2938503002: DevTools: unify Network & CPU throttling (Closed)
Patch Set: fmt 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/MobileThrottling.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/MobileThrottling.js b/third_party/WebKit/Source/devtools/front_end/sdk/MobileThrottling.js
new file mode 100644
index 0000000000000000000000000000000000000000..1f6660733217c133737ac5255afe625995c3fa88
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/MobileThrottling.js
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+SDK.MobileThrottling = {};
dgozman 2017/06/13 01:47:08 Move it back to NetworkManager.
chenwilliam 2017/06/13 21:54:52 It seemed bad to me that NetworkManager knows abou
dgozman 2017/06/13 23:18:39 Great idea, but move MobileThrottling.Conditions t
+
+/** @typedef {{download: number, upload: number, latency: number, title: string, cpuThrottlingRate: number}} */
+SDK.MobileThrottling.Conditions;
+
+/** @type {!SDK.MobileThrottling.Conditions} */
+SDK.MobileThrottling.NoThrottlingConditions = {
+ title: Common.UIString('No throttling'),
+ download: -1,
+ upload: -1,
+ latency: 0,
+ cpuThrottlingRate: 1,
+};
+
+/** @type {!SDK.MobileThrottling.Conditions} */
+SDK.MobileThrottling.OfflineConditions = {
+ title: Common.UIString('Offline'),
+ download: 0,
+ upload: 0,
+ latency: 0,
+ cpuThrottlingRate: 1,
+};

Powered by Google App Engine
This is Rietveld 408576698