| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 NetworkingPrivateServiceClient::GetDeviceStateList() { | 346 NetworkingPrivateServiceClient::GetDeviceStateList() { |
| 347 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList); | 347 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList); |
| 348 std::unique_ptr<api::networking_private::DeviceStateProperties> properties( | 348 std::unique_ptr<api::networking_private::DeviceStateProperties> properties( |
| 349 new api::networking_private::DeviceStateProperties); | 349 new api::networking_private::DeviceStateProperties); |
| 350 properties->type = api::networking_private::NETWORK_TYPE_WIFI; | 350 properties->type = api::networking_private::NETWORK_TYPE_WIFI; |
| 351 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; | 351 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; |
| 352 device_state_list->push_back(std::move(properties)); | 352 device_state_list->push_back(std::move(properties)); |
| 353 return device_state_list; | 353 return device_state_list; |
| 354 } | 354 } |
| 355 | 355 |
| 356 std::unique_ptr<base::DictionaryValue> |
| 357 NetworkingPrivateServiceClient::GetGlobalPolicy() { |
| 358 return base::MakeUnique<base::DictionaryValue>(); |
| 359 } |
| 360 |
| 356 bool NetworkingPrivateServiceClient::EnableNetworkType( | 361 bool NetworkingPrivateServiceClient::EnableNetworkType( |
| 357 const std::string& type) { | 362 const std::string& type) { |
| 358 return false; | 363 return false; |
| 359 } | 364 } |
| 360 | 365 |
| 361 bool NetworkingPrivateServiceClient::DisableNetworkType( | 366 bool NetworkingPrivateServiceClient::DisableNetworkType( |
| 362 const std::string& type) { | 367 const std::string& type) { |
| 363 return false; | 368 return false; |
| 364 } | 369 } |
| 365 | 370 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 473 } |
| 469 | 474 |
| 470 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( | 475 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( |
| 471 const std::vector<std::string>& network_guids) { | 476 const std::vector<std::string>& network_guids) { |
| 472 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 477 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 473 for (auto& observer : network_events_observers_) | 478 for (auto& observer : network_events_observers_) |
| 474 observer.OnNetworkListChangedEvent(network_guids); | 479 observer.OnNetworkListChangedEvent(network_guids); |
| 475 } | 480 } |
| 476 | 481 |
| 477 } // namespace extensions | 482 } // namespace extensions |
| OLD | NEW |