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

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

Issue 2450433003: Adding observer functionality to UINetworkQualityService (Closed)
Patch Set: nits 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 | « components/offline_pages/background/request_coordinator_unittest.cc ('k') | 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_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 private: 149 private:
150 DISALLOW_COPY_AND_ASSIGN(ThroughputObserver); 150 DISALLOW_COPY_AND_ASSIGN(ThroughputObserver);
151 }; 151 };
152 152
153 // Provides simple interface to obtain the effective connection type. 153 // Provides simple interface to obtain the effective connection type.
154 class NET_EXPORT NetworkQualityProvider { 154 class NET_EXPORT NetworkQualityProvider {
155 public: 155 public:
156 // Returns the current effective connection type. 156 // Returns the current effective connection type.
157 virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0; 157 virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0;
158 158
159 // Adds |observer| to a list of effective connection type observers.
160 virtual void AddEffectiveConnectionTypeObserver(
161 EffectiveConnectionTypeObserver* observer) = 0;
162
163 // Removes |observer| from a list of effective connection type observers.
164 virtual void RemoveEffectiveConnectionTypeObserver(
165 EffectiveConnectionTypeObserver* observer) = 0;
166
159 virtual ~NetworkQualityProvider() {} 167 virtual ~NetworkQualityProvider() {}
160 168
161 protected: 169 protected:
162 NetworkQualityProvider() {} 170 NetworkQualityProvider() {}
163 171
164 private: 172 private:
165 DISALLOW_COPY_AND_ASSIGN(NetworkQualityProvider); 173 DISALLOW_COPY_AND_ASSIGN(NetworkQualityProvider);
166 }; 174 };
167 175
168 // Creates a new NetworkQualityEstimator. 176 // Creates a new NetworkQualityEstimator.
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 base::ThreadChecker thread_checker_; 735 base::ThreadChecker thread_checker_;
728 736
729 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 737 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
730 738
731 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 739 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
732 }; 740 };
733 741
734 } // namespace net 742 } // namespace net
735 743
736 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 744 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/request_coordinator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698