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

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

Issue 1942893002: Split NQE to multiple files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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 | « net/net.gypi ('k') | net/nqe/cached_network_quality.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_NQE_CACHED_NETWORK_QUALITY_H_
6 #define NET_NQE_CACHED_NETWORK_QUALITY_H_
7
8 #include "base/macros.h"
9 #include "base/time/time.h"
10 #include "net/base/net_export.h"
11 #include "net/nqe/network_quality.h"
12
13 namespace net {
14
15 namespace nqe {
16
17 namespace internal {
18
19 // CachedNetworkQuality stores the quality of a previously seen network.
20 class NET_EXPORT_PRIVATE CachedNetworkQuality {
21 public:
22 explicit CachedNetworkQuality(const NetworkQuality& network_quality);
23 CachedNetworkQuality(const CachedNetworkQuality& other);
24 ~CachedNetworkQuality();
25
26 // Returns the network quality associated with this cached entry.
27 const NetworkQuality& network_quality() const { return network_quality_; }
28
29 // Returns true if this cache entry was updated before
30 // |cached_network_quality|.
31 bool OlderThan(const CachedNetworkQuality& cached_network_quality) const;
32
33 // Time when this cache entry was last updated.
34 const base::TimeTicks last_update_time_;
35
36 // Quality of this cached network.
37 const NetworkQuality network_quality_;
38
39 private:
40 DISALLOW_ASSIGN(CachedNetworkQuality);
41 };
42
43 } // namespace internal
44
45 } // namespace nqe
46
47 } // namespace net
48
49 #endif // NET_NQE_CACHED_NETWORK_QUALITY_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/nqe/cached_network_quality.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698