OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ |
6 #define CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ | 6 #define CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/network_quality_observer_factory.h" | 15 #include "content/public/browser/network_quality_observer_factory.h" |
16 #include "net/nqe/effective_connection_type.h" | 16 #include "net/nqe/effective_connection_type.h" |
| 17 #include "net/nqe/effective_connection_type_observer.h" |
17 #include "net/nqe/network_quality.h" | 18 #include "net/nqe/network_quality.h" |
18 #include "net/nqe/network_quality_estimator.h" | 19 #include "net/nqe/network_quality_estimator.h" |
| 20 #include "net/nqe/rtt_throughput_estimates_observer.h" |
19 | 21 |
20 namespace content { | 22 namespace content { |
21 | 23 |
22 // Listens for changes to the network quality and manages sending updates to | 24 // Listens for changes to the network quality and manages sending updates to |
23 // each RenderProcess via mojo. | 25 // each RenderProcess via mojo. |
24 class CONTENT_EXPORT NetworkQualityObserverImpl | 26 class CONTENT_EXPORT NetworkQualityObserverImpl |
25 : public net::NetworkQualityEstimator::EffectiveConnectionTypeObserver, | 27 : public net::EffectiveConnectionTypeObserver, |
26 public net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver { | 28 public net::RTTAndThroughputEstimatesObserver { |
27 public: | 29 public: |
28 explicit NetworkQualityObserverImpl( | 30 explicit NetworkQualityObserverImpl( |
29 net::NetworkQualityEstimator* network_quality_estimator); | 31 net::NetworkQualityEstimator* network_quality_estimator); |
30 | 32 |
31 ~NetworkQualityObserverImpl() override; | 33 ~NetworkQualityObserverImpl() override; |
32 | 34 |
33 private: | 35 private: |
34 class UiThreadObserver; | 36 class UiThreadObserver; |
35 | 37 |
36 // net::NetworkQualityEstimator::EffectiveConnectionTypeObserver | 38 // net::NetworkQualityEstimator::EffectiveConnectionTypeObserver |
(...skipping 23 matching lines...) Expand all Loading... |
60 net::nqe::internal::NetworkQuality last_notified_network_quality_; | 62 net::nqe::internal::NetworkQuality last_notified_network_quality_; |
61 | 63 |
62 base::ThreadChecker thread_checker_; | 64 base::ThreadChecker thread_checker_; |
63 | 65 |
64 DISALLOW_COPY_AND_ASSIGN(NetworkQualityObserverImpl); | 66 DISALLOW_COPY_AND_ASSIGN(NetworkQualityObserverImpl); |
65 }; | 67 }; |
66 | 68 |
67 } // namespace content | 69 } // namespace content |
68 | 70 |
69 #endif // CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ | 71 #endif // CONTENT_BROWSER_NET_NETWORK_QUALITY_OBSERVER_IMPL_H_ |
OLD | NEW |