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

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

Issue 2202693005: Don't set MAC address randomization when unsupported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use weak ptr Created 4 years, 4 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 | chromeos/network/network_device_handler_impl.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 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
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
14 #include "chromeos/chromeos_export.h" 15 #include "chromeos/chromeos_export.h"
15 #include "chromeos/network/network_device_handler.h" 16 #include "chromeos/network/network_device_handler.h"
16 #include "chromeos/network/network_handler.h" 17 #include "chromeos/network/network_handler.h"
17 #include "chromeos/network/network_handler_callbacks.h" 18 #include "chromeos/network/network_handler_callbacks.h"
18 #include "chromeos/network/network_state_handler_observer.h" 19 #include "chromeos/network/network_state_handler_observer.h"
19 20
20 namespace chromeos { 21 namespace chromeos {
21 22
22 class NetworkStateHandler; 23 class NetworkStateHandler;
23 24
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 128
128 void Init(NetworkStateHandler* network_state_handler); 129 void Init(NetworkStateHandler* network_state_handler);
129 130
130 // Apply the current value of |cellular_allow_roaming_| to all existing 131 // Apply the current value of |cellular_allow_roaming_| to all existing
131 // cellular devices of Shill. 132 // cellular devices of Shill.
132 void ApplyCellularAllowRoamingToShill(); 133 void ApplyCellularAllowRoamingToShill();
133 134
134 // Apply the current value of |mac_addr_randomization_| to wifi devices. 135 // Apply the current value of |mac_addr_randomization_| to wifi devices.
135 void ApplyMACAddressRandomizationToShill(); 136 void ApplyMACAddressRandomizationToShill();
136 137
138 void SetMACAddressRandomizationErrorCallback(
139 const std::string& error_name,
140 std::unique_ptr<base::DictionaryValue> error_data);
141
137 // Get the DeviceState for the wifi device, if any. 142 // Get the DeviceState for the wifi device, if any.
138 const DeviceState* GetWifiDeviceState( 143 const DeviceState* GetWifiDeviceState(
139 const network_handler::ErrorCallback& error_callback); 144 const network_handler::ErrorCallback& error_callback);
140 145
141 NetworkStateHandler* network_state_handler_; 146 NetworkStateHandler* network_state_handler_;
142 bool cellular_allow_roaming_; 147 bool cellular_allow_roaming_;
143 bool mac_addr_randomization_; 148 bool mac_addr_randomization_supported_;
149 bool mac_addr_randomization_enabled_;
150 base::WeakPtrFactory<NetworkDeviceHandlerImpl> weak_ptr_factory_;
144 151
145 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl); 152 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl);
146 }; 153 };
147 154
148 } // namespace chromeos 155 } // namespace chromeos
149 156
150 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ 157 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/network_device_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698