diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-14 17:41:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-08-04 12:37:36 +0000 |
commit | 399c965b6064c440ddcf4015f5f8e9d131c7a0a6 (patch) | |
tree | 6b06b60ff365abef0e13b3503d593a0df48d20e8 /chromium/net/nqe/network_quality.cc | |
parent | 7366110654eec46f21b6824f302356426f48cd74 (diff) | |
download | qtwebengine-chromium-399c965b6064c440ddcf4015f5f8e9d131c7a0a6.tar.gz |
BASELINE: Update Chromium to 52.0.2743.76 and Ninja to 1.7.1
Change-Id: I382f51b959689505a60f8b707255ecb344f7d8b4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/net/nqe/network_quality.cc')
-rw-r--r-- | chromium/net/nqe/network_quality.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chromium/net/nqe/network_quality.cc b/chromium/net/nqe/network_quality.cc new file mode 100644 index 00000000000..cf9a334ce05 --- /dev/null +++ b/chromium/net/nqe/network_quality.cc @@ -0,0 +1,42 @@ +// Copyright 2016 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. + +#include "net/nqe/network_quality.h" + +namespace net { + +namespace nqe { + +namespace internal { + +base::TimeDelta InvalidRTT() { + return base::TimeDelta::Max(); +} + +NetworkQuality::NetworkQuality() + : NetworkQuality(InvalidRTT(), kInvalidThroughput) {} + +NetworkQuality::NetworkQuality(const base::TimeDelta& rtt, + int32_t downstream_throughput_kbps) + : rtt_(rtt), downstream_throughput_kbps_(downstream_throughput_kbps) { + DCHECK_GE(rtt_, base::TimeDelta()); + DCHECK_GE(downstream_throughput_kbps_, 0); +} + +NetworkQuality::NetworkQuality(const NetworkQuality& other) + : NetworkQuality(other.rtt_, other.downstream_throughput_kbps_) {} + +NetworkQuality::~NetworkQuality() {} + +NetworkQuality& NetworkQuality::operator=(const NetworkQuality& other) { + rtt_ = other.rtt_; + downstream_throughput_kbps_ = other.downstream_throughput_kbps_; + return *this; +} + +} // namespace internal + +} // namespace nqe + +} // namespace net
\ No newline at end of file |