| Index: components/wifi_sync/network_state_helper_chromeos.cc
|
| diff --git a/components/wifi_sync/network_state_helper_chromeos.cc b/components/wifi_sync/network_state_helper_chromeos.cc
|
| index 54b853527ca2cbe55616ec307c9d75bae14f6c90..9203cceb1b95aebaf1a29d0879051c81ff317df8 100644
|
| --- a/components/wifi_sync/network_state_helper_chromeos.cc
|
| +++ b/components/wifi_sync/network_state_helper_chromeos.cc
|
| @@ -36,10 +36,16 @@ WifiCredential::CredentialSet GetWifiCredentialsForShillProfile(
|
| // TODO(quiche): Fill in the actual passphrase via an asynchronous
|
| // call to a chromeos::NetworkConfigurationHandler instance's
|
| // GetProperties method.
|
| - credentials.insert(
|
| - WifiCredential(network->raw_ssid(),
|
| - WifiSecurityClassFromShillSecurity(network->security()),
|
| - "" /* empty passphrase */));
|
| + scoped_ptr<WifiCredential> credential =
|
| + WifiCredential::Create(
|
| + network->raw_ssid(),
|
| + WifiSecurityClassFromShillSecurity(network->security()),
|
| + "" /* empty passphrase */);
|
| + if (!credential) {
|
| + LOG(ERROR) << "Failed to create credential";
|
| + } else {
|
| + credentials.insert(*credential);
|
| + }
|
| }
|
| return credentials;
|
| }
|
|
|