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 #include "extensions/browser/api/networking_private/networking_private_api.h" | 5 #include "extensions/browser/api/networking_private/networking_private_api.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 params->properties.ToValue()); | 184 params->properties.ToValue()); |
185 | 185 |
186 GetDelegate(browser_context()) | 186 GetDelegate(browser_context()) |
187 ->CreateNetwork( | 187 ->CreateNetwork( |
188 params->shared, std::move(properties_dict), | 188 params->shared, std::move(properties_dict), |
189 base::Bind(&NetworkingPrivateCreateNetworkFunction::Success, this), | 189 base::Bind(&NetworkingPrivateCreateNetworkFunction::Success, this), |
190 base::Bind(&NetworkingPrivateCreateNetworkFunction::Failure, this)); | 190 base::Bind(&NetworkingPrivateCreateNetworkFunction::Failure, this)); |
191 return true; | 191 return true; |
192 } | 192 } |
193 | 193 |
194 void NetworkingPrivateCreateNetworkFunction::Success(const std::string& guid) { | 194 void NetworkingPrivateCreateNetworkFunction::Success( |
| 195 const std::string& service_path, |
| 196 const std::string& guid) { |
195 results_ = private_api::CreateNetwork::Results::Create(guid); | 197 results_ = private_api::CreateNetwork::Results::Create(guid); |
196 SendResponse(true); | 198 SendResponse(true); |
197 } | 199 } |
198 | 200 |
199 void NetworkingPrivateCreateNetworkFunction::Failure(const std::string& error) { | 201 void NetworkingPrivateCreateNetworkFunction::Failure(const std::string& error) { |
200 error_ = error; | 202 error_ = error; |
201 SendResponse(false); | 203 SendResponse(false); |
202 } | 204 } |
203 | 205 |
204 //////////////////////////////////////////////////////////////////////////////// | 206 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 SendResponse(true); | 766 SendResponse(true); |
765 } | 767 } |
766 | 768 |
767 void NetworkingPrivateSetCellularSimStateFunction::Failure( | 769 void NetworkingPrivateSetCellularSimStateFunction::Failure( |
768 const std::string& error) { | 770 const std::string& error) { |
769 error_ = error; | 771 error_ = error; |
770 SendResponse(false); | 772 SendResponse(false); |
771 } | 773 } |
772 | 774 |
773 } // namespace extensions | 775 } // namespace extensions |
OLD | NEW |