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

Side by Side Diff: chromeos/network/network_device_handler_impl.h

Issue 2040603002: Add support for MAC address randomization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix FakeNetworkDeviceHandler in unit tests Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_NETWORK_DEVICE_HANDLER_IMPL_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_
6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ 6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const network_handler::ErrorCallback& error_callback) override; 82 const network_handler::ErrorCallback& error_callback) override;
83 83
84 void ChangePin(const std::string& device_path, 84 void ChangePin(const std::string& device_path,
85 const std::string& old_pin, 85 const std::string& old_pin,
86 const std::string& new_pin, 86 const std::string& new_pin,
87 const base::Closure& callback, 87 const base::Closure& callback,
88 const network_handler::ErrorCallback& error_callback) override; 88 const network_handler::ErrorCallback& error_callback) override;
89 89
90 void SetCellularAllowRoaming(bool allow_roaming) override; 90 void SetCellularAllowRoaming(bool allow_roaming) override;
91 91
92 void SetMACAddressRandomizationEnabled(bool enabled) override;
93
92 void SetWifiTDLSEnabled( 94 void SetWifiTDLSEnabled(
93 const std::string& ip_or_mac_address, 95 const std::string& ip_or_mac_address,
94 bool enabled, 96 bool enabled,
95 const network_handler::StringResultCallback& callback, 97 const network_handler::StringResultCallback& callback,
96 const network_handler::ErrorCallback& error_callback) override; 98 const network_handler::ErrorCallback& error_callback) override;
97 99
98 void GetWifiTDLSStatus( 100 void GetWifiTDLSStatus(
99 const std::string& ip_or_mac_address, 101 const std::string& ip_or_mac_address,
100 const network_handler::StringResultCallback& callback, 102 const network_handler::StringResultCallback& callback,
101 const network_handler::ErrorCallback& error_callback) override; 103 const network_handler::ErrorCallback& error_callback) override;
(...skipping 20 matching lines...) Expand all
122 friend class NetworkDeviceHandlerTest; 124 friend class NetworkDeviceHandlerTest;
123 125
124 NetworkDeviceHandlerImpl(); 126 NetworkDeviceHandlerImpl();
125 127
126 void Init(NetworkStateHandler* network_state_handler); 128 void Init(NetworkStateHandler* network_state_handler);
127 129
128 // Apply the current value of |cellular_allow_roaming_| to all existing 130 // Apply the current value of |cellular_allow_roaming_| to all existing
129 // cellular devices of Shill. 131 // cellular devices of Shill.
130 void ApplyCellularAllowRoamingToShill(); 132 void ApplyCellularAllowRoamingToShill();
131 133
134 // Apply the current value of |mac_addr_randomization_| to wifi devices.
135 void ApplyMACAddressRandomizationToShill();
136
132 // Get the DeviceState for the wifi device, if any. 137 // Get the DeviceState for the wifi device, if any.
133 const DeviceState* GetWifiDeviceState( 138 const DeviceState* GetWifiDeviceState(
134 const network_handler::ErrorCallback& error_callback); 139 const network_handler::ErrorCallback& error_callback);
135 140
136 NetworkStateHandler* network_state_handler_; 141 NetworkStateHandler* network_state_handler_;
137 bool cellular_allow_roaming_; 142 bool cellular_allow_roaming_;
143 bool mac_addr_randomization_;
138 144
139 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl); 145 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl);
140 }; 146 };
141 147
142 } // namespace chromeos 148 } // namespace chromeos
143 149
144 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ 150 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/network/network_device_handler.h ('k') | chromeos/network/network_device_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698