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_chromeos.
h" | 5 #include "extensions/browser/api/networking_private/networking_private_chromeos.
h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 const UIProxyConfig::ManualProxy& proxy) { | 279 const UIProxyConfig::ManualProxy& proxy) { |
280 base::DictionaryValue* dict = EnsureDictionaryValue(key, manual); | 280 base::DictionaryValue* dict = EnsureDictionaryValue(key, manual); |
281 base::DictionaryValue* host_dict = | 281 base::DictionaryValue* host_dict = |
282 EnsureDictionaryValue(::onc::proxy::kHost, dict); | 282 EnsureDictionaryValue(::onc::proxy::kHost, dict); |
283 SetProxyEffectiveValue(host_dict, state, | 283 SetProxyEffectiveValue(host_dict, state, |
284 base::MakeUnique<base::StringValue>( | 284 base::MakeUnique<base::StringValue>( |
285 proxy.server.host_port_pair().host())); | 285 proxy.server.host_port_pair().host())); |
286 uint16_t port = proxy.server.host_port_pair().port(); | 286 uint16_t port = proxy.server.host_port_pair().port(); |
287 base::DictionaryValue* port_dict = | 287 base::DictionaryValue* port_dict = |
288 EnsureDictionaryValue(::onc::proxy::kPort, dict); | 288 EnsureDictionaryValue(::onc::proxy::kPort, dict); |
289 SetProxyEffectiveValue(port_dict, state, | 289 SetProxyEffectiveValue(port_dict, state, base::MakeUnique<base::Value>(port)); |
290 base::MakeUnique<base::FundamentalValue>(port)); | |
291 } | 290 } |
292 | 291 |
293 } // namespace | 292 } // namespace |
294 | 293 |
295 //////////////////////////////////////////////////////////////////////////////// | 294 //////////////////////////////////////////////////////////////////////////////// |
296 | 295 |
297 namespace extensions { | 296 namespace extensions { |
298 | 297 |
299 NetworkingPrivateChromeOS::NetworkingPrivateChromeOS( | 298 NetworkingPrivateChromeOS::NetworkingPrivateChromeOS( |
300 content::BrowserContext* browser_context, | 299 content::BrowserContext* browser_context, |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 // Eventually the caller (e.g. Settings) should handle any failures and | 829 // Eventually the caller (e.g. Settings) should handle any failures and |
831 // show its own configuration UI. crbug.com/380937. | 830 // show its own configuration UI. crbug.com/380937. |
832 if (ui_delegate()->HandleConnectFailed(guid, error_name)) { | 831 if (ui_delegate()->HandleConnectFailed(guid, error_name)) { |
833 success_callback.Run(); | 832 success_callback.Run(); |
834 return; | 833 return; |
835 } | 834 } |
836 failure_callback.Run(error_name); | 835 failure_callback.Run(error_name); |
837 } | 836 } |
838 | 837 |
839 } // namespace extensions | 838 } // namespace extensions |
OLD | NEW |