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

Side by Side Diff: chrome/browser/net/nqe/ui_network_quality_estimator_service.h

Issue 2172393002: Cleaning up some code in UINQEService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | chrome/browser/net/nqe/ui_network_quality_estimator_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
6 #define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 6 #define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_checker.h"
11 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
12 #include "net/nqe/network_quality_estimator.h" 11 #include "net/nqe/network_quality_estimator.h"
13 12
14 class Profile;
15
16 // UI service to determine the current EffectiveConnectionType. 13 // UI service to determine the current EffectiveConnectionType.
17 class UINetworkQualityEstimatorService : public KeyedService { 14 class UINetworkQualityEstimatorService : public KeyedService {
18 public: 15 public:
19 explicit UINetworkQualityEstimatorService(Profile* profile); 16 UINetworkQualityEstimatorService();
20 ~UINetworkQualityEstimatorService() override; 17 ~UINetworkQualityEstimatorService() override;
21 18
22 // The current EffectiveConnectionType. 19 // The current EffectiveConnectionType.
23 net::NetworkQualityEstimator::EffectiveConnectionType 20 net::NetworkQualityEstimator::EffectiveConnectionType
24 GetEffectiveConnectionType() const; 21 GetEffectiveConnectionType() const;
25 22
26 private: 23 private:
27 class IONetworkQualityObserver; 24 class IONetworkQualityObserver;
28 25
29 // KeyedService implementation: 26 // KeyedService implementation:
(...skipping 12 matching lines...) Expand all
42 // IO thread based observer that is owned by this service. Created on the UI 39 // IO thread based observer that is owned by this service. Created on the UI
43 // thread, but used and deleted on the IO thread. 40 // thread, but used and deleted on the IO thread.
44 IONetworkQualityObserver* io_observer_; 41 IONetworkQualityObserver* io_observer_;
45 42
46 base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_; 43 base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_;
47 44
48 DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService); 45 DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService);
49 }; 46 };
50 47
51 #endif // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 48 #endif // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/nqe/ui_network_quality_estimator_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698