Chromium Code Reviews| 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) { |
|
erikwright (departed)
2015/01/09 14:58:21
The braces are not required here, and should be om
mukesh agrawal
2015/01/09 19:00:02
Done.
|
| + LOG(ERROR) << "Failed to create credential"; |
| + } else { |
| + credentials.insert(*credential); |
| + } |
| } |
| return credentials; |
| } |