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

Side by Side Diff: net/nqe/cached_network_quality.cc

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: More fixups Created 4 years, 1 month 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 | « net/nqe/cached_network_quality.h ('k') | net/nqe/network_id.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "net/nqe/cached_network_quality.h" 5 #include "net/nqe/cached_network_quality.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 namespace nqe { 9 namespace nqe {
10 10
11 namespace internal { 11 namespace internal {
12 12
13 CachedNetworkQuality::CachedNetworkQuality() 13 CachedNetworkQuality::CachedNetworkQuality()
14 : effective_connection_type_(EFFECTIVE_CONNECTION_TYPE_UNKNOWN) {} 14 : effective_connection_type_(EFFECTIVE_CONNECTION_TYPE_UNKNOWN) {}
15 15
16 CachedNetworkQuality::CachedNetworkQuality( 16 CachedNetworkQuality::CachedNetworkQuality(
17 EffectiveConnectionType effective_connection_type)
18 : CachedNetworkQuality(base::TimeTicks::Now(),
19 NetworkQuality(),
20 effective_connection_type) {}
21
22 CachedNetworkQuality::CachedNetworkQuality(
17 base::TimeTicks last_update_time, 23 base::TimeTicks last_update_time,
18 const NetworkQuality& network_quality, 24 const NetworkQuality& network_quality,
19 EffectiveConnectionType effective_connection_type) 25 EffectiveConnectionType effective_connection_type)
20 : last_update_time_(last_update_time), 26 : last_update_time_(last_update_time),
21 network_quality_(network_quality), 27 network_quality_(network_quality),
22 effective_connection_type_(effective_connection_type) {} 28 effective_connection_type_(effective_connection_type) {}
23 29
24 CachedNetworkQuality::CachedNetworkQuality(const CachedNetworkQuality& other) = 30 CachedNetworkQuality::CachedNetworkQuality(const CachedNetworkQuality& other) =
25 default; 31 default;
26 32
27 CachedNetworkQuality::~CachedNetworkQuality() {} 33 CachedNetworkQuality::~CachedNetworkQuality() {}
28 34
29 CachedNetworkQuality& CachedNetworkQuality::operator=( 35 CachedNetworkQuality& CachedNetworkQuality::operator=(
30 const CachedNetworkQuality& other) = default; 36 const CachedNetworkQuality& other) = default;
31 37
32 bool CachedNetworkQuality::OlderThan( 38 bool CachedNetworkQuality::OlderThan(
33 const CachedNetworkQuality& cached_network_quality) const { 39 const CachedNetworkQuality& cached_network_quality) const {
34 return last_update_time_ < cached_network_quality.last_update_time_; 40 return last_update_time_ < cached_network_quality.last_update_time_;
35 } 41 }
36 42
37 } // namespace internal 43 } // namespace internal
38 44
39 } // namespace nqe 45 } // namespace nqe
40 46
41 } // namespace net 47 } // namespace net
OLDNEW
« no previous file with comments | « net/nqe/cached_network_quality.h ('k') | net/nqe/network_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698