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

Side by Side Diff: chrome/browser/devtools/devtools_network_conditions.cc

Issue 1039213002: DevTools: NetworkConditionsEmulation: fix interpretation of incorrect settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/devtools/devtools_network_conditions.h" 5 #include "chrome/browser/devtools/devtools_network_conditions.h"
6 6
7 #include "url/gurl.h" 7 #include "url/gurl.h"
8 8
9 DevToolsNetworkConditions::DevToolsNetworkConditions() 9 DevToolsNetworkConditions::DevToolsNetworkConditions()
10 : offline_(false), 10 : offline_(false),
(...skipping 17 matching lines...) Expand all
28 : offline_(offline), 28 : offline_(offline),
29 latency_(latency), 29 latency_(latency),
30 download_throughput_(download_throughput), 30 download_throughput_(download_throughput),
31 upload_throughput_(upload_throughput) { 31 upload_throughput_(upload_throughput) {
32 } 32 }
33 33
34 DevToolsNetworkConditions::~DevToolsNetworkConditions() { 34 DevToolsNetworkConditions::~DevToolsNetworkConditions() {
35 } 35 }
36 36
37 bool DevToolsNetworkConditions::IsThrottling() const { 37 bool DevToolsNetworkConditions::IsThrottling() const {
38 return (latency_ != 0) || (download_throughput_ != 0.0) || 38 return !offline_ && ((latency_ != 0) || (download_throughput_ != 0.0) ||
dgozman 2015/03/27 11:42:35 Don't you want to remove offline parameter entirel
39 (upload_throughput_ != 0); 39 (upload_throughput_ != 0));
40 } 40 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698