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

Side by Side Diff: net/base/network_quality_estimator.h

Issue 1318033002: Returning const ref instead of const value in CachedNetworkQuality::network_quality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 5 #ifndef NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 }; 189 };
190 190
191 // CachedNetworkQuality stores the quality of a previously seen network. 191 // CachedNetworkQuality stores the quality of a previously seen network.
192 class NET_EXPORT_PRIVATE CachedNetworkQuality { 192 class NET_EXPORT_PRIVATE CachedNetworkQuality {
193 public: 193 public:
194 explicit CachedNetworkQuality(const NetworkQuality& network_quality); 194 explicit CachedNetworkQuality(const NetworkQuality& network_quality);
195 CachedNetworkQuality(const CachedNetworkQuality& other); 195 CachedNetworkQuality(const CachedNetworkQuality& other);
196 ~CachedNetworkQuality(); 196 ~CachedNetworkQuality();
197 197
198 // Returns the network quality associated with this cached entry. 198 // Returns the network quality associated with this cached entry.
199 const NetworkQuality network_quality() const { return network_quality_; } 199 const NetworkQuality& network_quality() const { return network_quality_; }
200 200
201 // Returns true if this cache entry was updated before 201 // Returns true if this cache entry was updated before
202 // |cached_network_quality|. 202 // |cached_network_quality|.
203 bool OlderThan(const CachedNetworkQuality& cached_network_quality) const; 203 bool OlderThan(const CachedNetworkQuality& cached_network_quality) const;
204 204
205 // Time when this cache entry was last updated. 205 // Time when this cache entry was last updated.
206 const base::TimeTicks last_update_time_; 206 const base::TimeTicks last_update_time_;
207 207
208 // Quality of this cached network. 208 // Quality of this cached network.
209 const NetworkQuality network_quality_; 209 const NetworkQuality network_quality_;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 const scoped_ptr<ExternalEstimateProvider> external_estimates_provider_; 433 const scoped_ptr<ExternalEstimateProvider> external_estimates_provider_;
434 434
435 base::ThreadChecker thread_checker_; 435 base::ThreadChecker thread_checker_;
436 436
437 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 437 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
438 }; 438 };
439 439
440 } // namespace net 440 } // namespace net
441 441
442 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 442 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
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