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

Unified Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 8947002: Revert 114515 - broke CrOS tests: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/cros/onc_network_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/network_library.cc
===================================================================
--- chrome/browser/chromeos/cros/network_library.cc (revision 114527)
+++ chrome/browser/chromeos/cros/network_library.cc (working copy)
@@ -1745,8 +1745,7 @@
// virtual SetIPConfig implemented in derived classes.
virtual void SwitchToPreferredNetwork() OVERRIDE;
virtual bool LoadOncNetworks(const std::string& onc_blob,
- const std::string& passcode,
- std::string* error) OVERRIDE;
+ const std::string& passcode) OVERRIDE;
virtual bool SetActiveNetwork(ConnectionType type,
const std::string& service_path) OVERRIDE;
@@ -2835,23 +2834,14 @@
}
bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
- const std::string& passcode,
- std::string* error) {
+ const std::string& passcode) {
// TODO(gspencer): Add support for decrypting onc files. crbug.com/19397
OncNetworkParser parser(onc_blob);
- if (!parser.parse_error().empty()) {
- if (error)
- *error = parser.parse_error();
- return false;
- }
-
for (int i = 0; i < parser.GetCertificatesSize(); i++) {
// Insert each of the available certs into the certificate DB.
if (parser.ParseCertificate(i).get() == NULL) {
DLOG(WARNING) << "Cannot parse certificate in ONC file";
- if (error)
- *error = parser.parse_error();
return false;
}
}
@@ -2861,8 +2851,6 @@
scoped_ptr<Network> network(parser.ParseNetwork(i));
if (!network.get()) {
DLOG(WARNING) << "Cannot parse network in ONC file";
- if (error)
- *error = parser.parse_error();
return false;
}
@@ -2880,15 +2868,8 @@
CallConfigureService(network->unique_id(), &dict);
}
-
- if (parser.GetNetworkConfigsSize() != 0 ||
- parser.GetCertificatesSize() != 0) {
- if (error)
- *error = l10n_util::GetStringUTF8(
- IDS_NETWORK_CONFIG_ERROR_NETWORK_IMPORT);
- return false;
- }
- return true;
+ return (parser.GetNetworkConfigsSize() != 0 ||
+ parser.GetCertificatesSize() != 0);
}
////////////////////////////////////////////////////////////////////////////
@@ -5121,7 +5102,7 @@
" ],"
" \"Certificates\": []"
"}");
- LoadOncNetworks(test_blob, "", NULL);
+ LoadOncNetworks(test_blob, "");
}
////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/cros/onc_network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698