| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 FROM_HERE, base::Bind(&WiFiService::CreateNetwork, | 220 FROM_HERE, base::Bind(&WiFiService::CreateNetwork, |
| 221 base::Unretained(wifi_service_.get()), shared, | 221 base::Unretained(wifi_service_.get()), shared, |
| 222 base::Passed(&properties), network_guid, error), | 222 base::Passed(&properties), network_guid, error), |
| 223 base::Bind(&NetworkingPrivateServiceClient::AfterCreateNetwork, | 223 base::Bind(&NetworkingPrivateServiceClient::AfterCreateNetwork, |
| 224 weak_factory_.GetWeakPtr(), service_callbacks->id, | 224 weak_factory_.GetWeakPtr(), service_callbacks->id, |
| 225 base::Owned(network_guid), base::Owned(error))); | 225 base::Owned(network_guid), base::Owned(error))); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void NetworkingPrivateServiceClient::ForgetNetwork( | 228 void NetworkingPrivateServiceClient::ForgetNetwork( |
| 229 const std::string& guid, | 229 const std::string& guid, |
| 230 bool allow_forget_shared_config, |
| 230 const VoidCallback& success_callback, | 231 const VoidCallback& success_callback, |
| 231 const FailureCallback& failure_callback) { | 232 const FailureCallback& failure_callback) { |
| 232 // TODO(mef): Implement for Win/Mac | 233 // TODO(mef): Implement for Win/Mac |
| 233 failure_callback.Run(networking_private::kErrorNotSupported); | 234 failure_callback.Run(networking_private::kErrorNotSupported); |
| 234 } | 235 } |
| 235 | 236 |
| 236 void NetworkingPrivateServiceClient::GetNetworks( | 237 void NetworkingPrivateServiceClient::GetNetworks( |
| 237 const std::string& network_type, | 238 const std::string& network_type, |
| 238 bool configured_only, | 239 bool configured_only, |
| 239 bool visible_only, | 240 bool visible_only, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } | 474 } |
| 474 | 475 |
| 475 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( | 476 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( |
| 476 const std::vector<std::string>& network_guids) { | 477 const std::vector<std::string>& network_guids) { |
| 477 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 478 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 478 for (auto& observer : network_events_observers_) | 479 for (auto& observer : network_events_observers_) |
| 479 observer.OnNetworkListChangedEvent(network_guids); | 480 observer.OnNetworkListChangedEvent(network_guids); |
| 480 } | 481 } |
| 481 | 482 |
| 482 } // namespace extensions | 483 } // namespace extensions |
| OLD | NEW |