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

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

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: Addressed ryansturm comments Created 4 years, 2 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
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_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 EffectiveConnectionType effective_connection_type); 234 EffectiveConnectionType effective_connection_type);
235 235
236 // Adds and removes |observer| from the list of cache observers. 236 // Adds and removes |observer| from the list of cache observers.
237 void AddNetworkQualitiesCacheObserver( 237 void AddNetworkQualitiesCacheObserver(
238 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* 238 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver*
239 observer); 239 observer);
240 void RemoveNetworkQualitiesCacheObserver( 240 void RemoveNetworkQualitiesCacheObserver(
241 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* 241 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver*
242 observer); 242 observer);
243 243
244 // Notifies |this| when the persistent prefs have been read. |read_prefs|
RyanSturm 2016/10/14 18:36:21 nit: s/Notifies |this| when/Called when
tbansal1 2016/10/14 21:15:10 Done.
245 // contains the parsed prefs as a map between NetworkIDs and
246 // CachedNetworkQualities.
247 void OnPrefsRead(
248 const std::map<nqe::internal::NetworkID,
249 nqe::internal::CachedNetworkQuality> read_prefs);
250
244 protected: 251 protected:
245 // NetworkChangeNotifier::ConnectionTypeObserver implementation: 252 // NetworkChangeNotifier::ConnectionTypeObserver implementation:
246 void OnConnectionTypeChanged( 253 void OnConnectionTypeChanged(
247 NetworkChangeNotifier::ConnectionType type) override; 254 NetworkChangeNotifier::ConnectionType type) override;
248 255
249 // ExternalEstimateProvider::UpdatedEstimateObserver implementation. 256 // ExternalEstimateProvider::UpdatedEstimateObserver implementation.
250 void OnUpdatedEstimateAvailable(const base::TimeDelta& rtt, 257 void OnUpdatedEstimateAvailable(const base::TimeDelta& rtt,
251 int32_t downstream_throughput_kbps, 258 int32_t downstream_throughput_kbps,
252 int32_t upstream_throughput_kbps) override; 259 int32_t upstream_throughput_kbps) override;
253 260
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 base::ThreadChecker thread_checker_; 655 base::ThreadChecker thread_checker_;
649 656
650 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 657 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
651 658
652 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 659 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
653 }; 660 };
654 661
655 } // namespace net 662 } // namespace net
656 663
657 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 664 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698