Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ | |
| 6 #define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "base/single_thread_task_runner.h" | |
| 13 #include "components/keyed_service/core/keyed_service.h" | |
| 14 #include "net/nqe/network_quality_estimator.h" | |
| 15 | |
| 16 class Profile; | |
| 17 | |
| 18 namespace chrome_browser_net { | |
| 19 | |
| 20 class UINetworkQualityEstimatorService : public KeyedService { | |
| 21 public: | |
| 22 explicit UINetworkQualityEstimatorService(Profile* profile); | |
| 23 ~UINetworkQualityEstimatorService() override; | |
| 24 | |
| 25 void EffectiveConnectionTypeChanged( | |
| 26 net::NetworkQualityEstimator::EffectiveConnectionType type_); | |
| 27 | |
| 28 void Initialize(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | |
|
tbansal1
2016/07/13 00:07:28
pass as const ref?
RyanSturm
2016/07/13 17:28:15
Done.
| |
| 29 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); | |
| 30 | |
| 31 void Shutdown() override; | |
| 32 | |
| 33 net::NetworkQualityEstimator::EffectiveConnectionType type() { return type_; } | |
|
tbansal1
2016/07/13 00:07:28
const function
Also, I think you should move the b
RyanSturm
2016/07/13 17:28:14
Done.
| |
| 34 | |
| 35 private: | |
| 36 net::NetworkQualityEstimator::EffectiveConnectionType type_; | |
| 37 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | |
|
tbansal1
2016/07/13 00:07:28
include: base/memory/ref_counted.h
RyanSturm
2016/07/13 17:28:14
Done.
| |
| 38 class IONetworkQualityObserver; | |
|
tbansal1
2016/07/13 00:07:28
This should be the first line in the private.
RyanSturm
2016/07/13 17:28:14
Done.
| |
| 39 IONetworkQualityObserver* io_observer_; | |
| 40 base::ThreadChecker thread_checker_; | |
| 41 | |
| 42 base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService); | |
| 45 }; | |
| 46 | |
| 47 } // namespace chrome_browser_net | |
| 48 | |
| 49 #endif // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ | |
| OLD | NEW |