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

Side by Side Diff: chrome/browser/chromeos/net/network_throttling_observer.h

Issue 2364703002: Add network throttling as an enterprise policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add network bandwidth throttling as an enterprise policy Created 4 years, 2 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698