Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 const FailureCallback& failure_callback) = 0; | 157 const FailureCallback& failure_callback) = 0; |
| 158 virtual void GetCaptivePortalStatus( | 158 virtual void GetCaptivePortalStatus( |
| 159 const std::string& guid, | 159 const std::string& guid, |
| 160 const StringCallback& success_callback, | 160 const StringCallback& success_callback, |
| 161 const FailureCallback& failure_callback) = 0; | 161 const FailureCallback& failure_callback) = 0; |
| 162 virtual void UnlockCellularSim(const std::string& guid, | 162 virtual void UnlockCellularSim(const std::string& guid, |
| 163 const std::string& pin, | 163 const std::string& pin, |
| 164 const std::string& puk, | 164 const std::string& puk, |
| 165 const VoidCallback& success_callback, | 165 const VoidCallback& success_callback, |
| 166 const FailureCallback& failure_callback) = 0; | 166 const FailureCallback& failure_callback) = 0; |
| 167 | |
| 168 virtual void SetCellularSimState(const std::string& guid, | 167 virtual void SetCellularSimState(const std::string& guid, |
| 169 bool require_pin, | 168 bool require_pin, |
| 170 const std::string& current_pin, | 169 const std::string& current_pin, |
| 171 const std::string& new_pin, | 170 const std::string& new_pin, |
| 172 const VoidCallback& success_callback, | 171 const VoidCallback& success_callback, |
| 173 const FailureCallback& failure_callback) = 0; | 172 const FailureCallback& failure_callback) = 0; |
| 174 | 173 |
| 175 // Synchronous methods | 174 // Synchronous methods |
| 176 | 175 |
| 177 // Returns a list of ONC type strings. | 176 // Returns a list of ONC type strings. |
| 178 virtual std::unique_ptr<base::ListValue> GetEnabledNetworkTypes() = 0; | 177 virtual std::unique_ptr<base::ListValue> GetEnabledNetworkTypes() = 0; |
| 179 | 178 |
| 180 // Returns a list of DeviceStateProperties. | 179 // Returns a list of DeviceStateProperties. |
| 181 virtual std::unique_ptr<DeviceStateList> GetDeviceStateList() = 0; | 180 virtual std::unique_ptr<DeviceStateList> GetDeviceStateList() = 0; |
| 182 | 181 |
| 182 // Returns a dictionary of global policy values (may be empty). Note: the | |
| 183 // dictionary is expected to be a superset of the networkingPrivate | |
| 184 // GlobalPolicy dictionary. Any properties not in GlobalPolicy will be | |
| 185 // ignored. | |
| 186 virtual std::unique_ptr<base::DictionaryValue> GetGlobalPolicy() = 0; | |
|
Devlin
2017/01/10 15:25:22
It looks like this is only used in the new API fun
stevenjb
2017/01/10 17:49:39
I guess my main objections to passing const Dictio
Devlin
2017/01/10 18:43:06
Most other methods actually *do* create/modify the
stevenjb
2017/01/10 18:58:29
How strongly do you feel about this?
| |
| 187 | |
| 183 // Returns true if the ONC network type |type| is enabled. | 188 // Returns true if the ONC network type |type| is enabled. |
| 184 virtual bool EnableNetworkType(const std::string& type) = 0; | 189 virtual bool EnableNetworkType(const std::string& type) = 0; |
| 185 | 190 |
| 186 // Returns true if the ONC network type |type| is disabled. | 191 // Returns true if the ONC network type |type| is disabled. |
| 187 virtual bool DisableNetworkType(const std::string& type) = 0; | 192 virtual bool DisableNetworkType(const std::string& type) = 0; |
| 188 | 193 |
| 189 // Returns true if a scan was requested. It may take many seconds for a scan | 194 // Returns true if a scan was requested. It may take many seconds for a scan |
| 190 // to complete. The scan may or may not trigger API events when complete. | 195 // to complete. The scan may or may not trigger API events when complete. |
| 191 virtual bool RequestScan() = 0; | 196 virtual bool RequestScan() = 0; |
| 192 | 197 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 216 | 221 |
| 217 // Interface for UI methods. May be null. | 222 // Interface for UI methods. May be null. |
| 218 std::unique_ptr<UIDelegate> ui_delegate_; | 223 std::unique_ptr<UIDelegate> ui_delegate_; |
| 219 | 224 |
| 220 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateDelegate); | 225 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateDelegate); |
| 221 }; | 226 }; |
| 222 | 227 |
| 223 } // namespace extensions | 228 } // namespace extensions |
| 224 | 229 |
| 225 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE _H_ | 230 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE _H_ |
| OLD | NEW |