summaryrefslogtreecommitdiffstats
path: root/components/wifi_sync/network_state_helper_chromeos.cc
diff options
context:
space:
mode:
Diffstat (limited to 'components/wifi_sync/network_state_helper_chromeos.cc')
-rw-r--r--components/wifi_sync/network_state_helper_chromeos.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/components/wifi_sync/network_state_helper_chromeos.cc b/components/wifi_sync/network_state_helper_chromeos.cc
index 5cf6f18..f7afa73 100644
--- a/components/wifi_sync/network_state_helper_chromeos.cc
+++ b/components/wifi_sync/network_state_helper_chromeos.cc
@@ -33,11 +33,15 @@ 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(
+ scoped_ptr<WifiCredential> credential =
+ WifiCredential::Create(
network->raw_ssid(),
WifiSecurityClassFromShillSecurity(network->security_class()),
- "" /* empty passphrase */));
+ "" /* empty passphrase */);
+ if (!credential)
+ LOG(ERROR) << "Failed to create credential";
+ else
+ credentials.insert(*credential);
}
return credentials;
}