Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: components/wifi_sync/network_state_helper_chromeos.cc

Issue 809803005: wifi_sync: add ability to convert WifiCredential to onc properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.0-wifi-security-class
Patch Set: rebase + resolve conflict Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/wifi_sync/BUILD.gn ('k') | components/wifi_sync/wifi_credential.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5cf6f183e4c2f787202e2a13c64478cb8cc194ba..f7afa73d4c22d512e29b48285c2f76c9c2ecdadb 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;
}
« no previous file with comments | « components/wifi_sync/BUILD.gn ('k') | components/wifi_sync/wifi_credential.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698