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

Side by Side Diff: chromeos/network/shill_property_handler.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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory>
10 #include <set> 11 #include <set>
11 #include <string> 12 #include <string>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "chromeos/dbus/dbus_method_call_status.h" 17 #include "chromeos/dbus/dbus_method_call_status.h"
17 #include "chromeos/dbus/shill_property_changed_observer.h" 18 #include "chromeos/dbus/shill_property_changed_observer.h"
18 #include "chromeos/network/managed_state.h" 19 #include "chromeos/network/managed_state.h"
19 #include "chromeos/network/network_handler_callbacks.h" 20 #include "chromeos/network/network_handler_callbacks.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const std::vector<std::string>& technologies, 133 const std::vector<std::string>& technologies,
133 const network_handler::ErrorCallback& error_callback); 134 const network_handler::ErrorCallback& error_callback);
134 135
135 // Sets the list of devices on which portal check is enabled. 136 // Sets the list of devices on which portal check is enabled.
136 void SetCheckPortalList(const std::string& check_portal_list); 137 void SetCheckPortalList(const std::string& check_portal_list);
137 138
138 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we 139 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we
139 // only set it. 140 // only set it.
140 void SetWakeOnLanEnabled(bool enabled); 141 void SetWakeOnLanEnabled(bool enabled);
141 142
143 // Wrapper over ShillManagerClient's SetNetworkThrottlingStatus
144 // We do not track/observe this, only set it.
145 void SetNetworkThrottlingStatus(bool enabled,
146 uint32_t upload_rate_kbits,
147 uint32_t download_rate_kbits);
148
142 // Requests an immediate network scan. 149 // Requests an immediate network scan.
143 void RequestScan() const; 150 void RequestScan() const;
144 151
145 // Requests all properties for the service or device (called for new items). 152 // Requests all properties for the service or device (called for new items).
146 void RequestProperties(ManagedState::ManagedType type, 153 void RequestProperties(ManagedState::ManagedType type,
147 const std::string& path); 154 const std::string& path);
148 155
149 // ShillPropertyChangedObserver overrides 156 // ShillPropertyChangedObserver overrides
150 void OnPropertyChanged(const std::string& key, 157 void OnPropertyChanged(const std::string& key,
151 const base::Value& value) override; 158 const base::Value& value) override;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 std::set<std::string> prohibited_technologies_; 259 std::set<std::string> prohibited_technologies_;
253 std::set<std::string> uninitialized_technologies_; 260 std::set<std::string> uninitialized_technologies_;
254 261
255 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); 262 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler);
256 }; 263 };
257 264
258 } // namespace internal 265 } // namespace internal
259 } // namespace chromeos 266 } // namespace chromeos
260 267
261 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 268 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698