| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/wifi_sync/wifi_config_delegate_chromeos.h" | 5 #include "components/wifi_sync/wifi_config_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 scoped_ptr<base::DictionaryValue> onc_properties( | 43 scoped_ptr<base::DictionaryValue> onc_properties( |
| 44 network_credential.ToOncProperties()); | 44 network_credential.ToOncProperties()); |
| 45 // TODO(quiche): Replace with DCHECK, once ONC supports non-UTF-8 SSIDs. | 45 // TODO(quiche): Replace with DCHECK, once ONC supports non-UTF-8 SSIDs. |
| 46 // crbug.com/432546 | 46 // crbug.com/432546 |
| 47 if (!onc_properties) { | 47 if (!onc_properties) { |
| 48 LOG(ERROR) << "Failed to generate ONC properties for " | 48 LOG(ERROR) << "Failed to generate ONC properties for " |
| 49 << network_credential.ToString(); | 49 << network_credential.ToString(); |
| 50 return; | 50 return; |
| 51 } | 51 } |
| 52 | 52 |
| 53 managed_network_configuration_handler_ | 53 managed_network_configuration_handler_->CreateConfiguration( |
| 54 ->CreateConfiguration( | 54 user_hash_, *onc_properties, |
| 55 user_hash_, | 55 chromeos::network_handler::ServiceResultCallback(), |
| 56 *onc_properties, | 56 base::Bind(OnCreateConfigurationFailed, network_credential)); |
| 57 chromeos::network_handler::StringResultCallback(), | |
| 58 base::Bind(OnCreateConfigurationFailed, network_credential)); | |
| 59 } | 57 } |
| 60 | 58 |
| 61 } // namespace wifi_sync | 59 } // namespace wifi_sync |
| OLD | NEW |