OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_CHROMEOS_NET_NETWORK_THROTTLING_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_THROTTLING_OBSERVER_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 |
| 10 class PrefRegistrySimple; |
| 11 class Profile; |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 namespace network_throttling_observer { |
| 16 |
| 17 void RegisterPrefs(PrefRegistrySimple* registry); |
| 18 } |
| 19 |
| 20 // TODO(kirtika): Explain what this class does |
| 21 // TODO(kirtika): Check and remove unnecessary dependencies |
| 22 class NetworkThrottlingObserver { |
| 23 public: |
| 24 NetworkThrottlingObserver(); |
| 25 ~NetworkThrottlingObserver(); |
| 26 |
| 27 static NetworkThrottlingObserver* Get(); |
| 28 |
| 29 // Should be called whenever the network throttling policy changes |
| 30 void OnPreferenceChanged(bool throttling_enabled, |
| 31 uint32_t upload_rate_kbits, |
| 32 uint32_t download_rate_kbits); |
| 33 |
| 34 private: |
| 35 base::WeakPtrFactory<NetworkThrottlingObserver> weak_ptr_factory_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NetworkThrottlingObserver); |
| 38 }; |
| 39 |
| 40 } // namespace chromeos |
| 41 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_THROTTLING_OBSERVER_H_ |
OLD | NEW |