| OLD | NEW |
| 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 #include "extensions/browser/api/networking_private/networking_private_service_c
lient.h" | 5 #include "extensions/browser/api/networking_private/networking_private_service_c
lient.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 scoped_ptr<base::ListValue> | 314 scoped_ptr<base::ListValue> |
| 315 NetworkingPrivateServiceClient::GetEnabledNetworkTypes() { | 315 NetworkingPrivateServiceClient::GetEnabledNetworkTypes() { |
| 316 scoped_ptr<base::ListValue> network_list; | 316 scoped_ptr<base::ListValue> network_list; |
| 317 network_list->AppendString(::onc::network_type::kWiFi); | 317 network_list->AppendString(::onc::network_type::kWiFi); |
| 318 return network_list.Pass(); | 318 return network_list.Pass(); |
| 319 } | 319 } |
| 320 | 320 |
| 321 scoped_ptr<NetworkingPrivateDelegate::DeviceStateList> | 321 scoped_ptr<NetworkingPrivateDelegate::DeviceStateList> |
| 322 NetworkingPrivateServiceClient::GetDeviceStateList() { | 322 NetworkingPrivateServiceClient::GetDeviceStateList() { |
| 323 scoped_ptr<DeviceStateList> device_state_list(new DeviceStateList); | 323 scoped_ptr<DeviceStateList> device_state_list(new DeviceStateList); |
| 324 scoped_ptr<core_api::networking_private::DeviceStateProperties> properties( | 324 scoped_ptr<api::networking_private::DeviceStateProperties> properties( |
| 325 new core_api::networking_private::DeviceStateProperties); | 325 new api::networking_private::DeviceStateProperties); |
| 326 properties->type = core_api::networking_private::NETWORK_TYPE_WIFI; | 326 properties->type = api::networking_private::NETWORK_TYPE_WIFI; |
| 327 properties->state = core_api::networking_private::DEVICE_STATE_TYPE_ENABLED; | 327 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; |
| 328 device_state_list->push_back(properties.Pass()); | 328 device_state_list->push_back(properties.Pass()); |
| 329 return device_state_list.Pass(); | 329 return device_state_list.Pass(); |
| 330 } | 330 } |
| 331 | 331 |
| 332 bool NetworkingPrivateServiceClient::EnableNetworkType( | 332 bool NetworkingPrivateServiceClient::EnableNetworkType( |
| 333 const std::string& type) { | 333 const std::string& type) { |
| 334 return false; | 334 return false; |
| 335 } | 335 } |
| 336 | 336 |
| 337 bool NetworkingPrivateServiceClient::DisableNetworkType( | 337 bool NetworkingPrivateServiceClient::DisableNetworkType( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( | 447 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( |
| 448 const std::vector<std::string>& network_guids) { | 448 const std::vector<std::string>& network_guids) { |
| 449 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 449 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 450 FOR_EACH_OBSERVER(NetworkingPrivateDelegateObserver, | 450 FOR_EACH_OBSERVER(NetworkingPrivateDelegateObserver, |
| 451 network_events_observers_, | 451 network_events_observers_, |
| 452 OnNetworkListChangedEvent(network_guids)); | 452 OnNetworkListChangedEvent(network_guids)); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace extensions | 455 } // namespace extensions |
| OLD | NEW |