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

Unified Diff: chromeos/network/network_configuration_handler.cc

Issue 243103004: Don't treat Shill ClearProperty errors as failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_configuration_handler.cc
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index ea81a75cc398d43fbc3113a2003d8226291c6d1c..6477193851d7a5f8f62a2a3778608d9f45eb40b8 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -400,31 +400,17 @@ void NetworkConfigurationHandler::ClearPropertiesSuccessCallback(
DCHECK(names.size() == result.GetSize())
<< "Incorrect result size from ClearProperties.";
- bool some_failed = false;
for (size_t i = 0; i < result.GetSize(); ++i) {
bool success = false;
result.GetBoolean(i, &success);
if (!success) {
+ // If we try to clear a property that hasn't been set the clear will
pneubeck (no reviews) 2014/04/22 07:16:41 can this error be distinguished from other errors?
stevenjb 2014/04/22 19:06:23 I'm not sure what you mean by "this error". We do
pneubeck (no reviews) 2014/04/22 19:12:11 Oh, I meant whether the error 'tried to clear a no
+ // fail, so just log the error.
NET_LOG_ERROR("ClearProperties Failed: " + names[i], service_path);
- some_failed = true;
}
}
- if (some_failed) {
- if (!error_callback.is_null()) {
- scoped_ptr<base::DictionaryValue> error_data(
- network_handler::CreateErrorData(
- service_path, kClearPropertiesFailedError,
- base::StringPrintf("Errors: %" PRIuS, result.GetSize())));
- error_data->Set("errors", result.DeepCopy());
- scoped_ptr<base::ListValue> name_list(new base::ListValue);
- name_list->AppendStrings(names);
- error_data->Set("names", name_list.release());
- error_callback.Run(kClearPropertiesFailedError, error_data.Pass());
- }
- } else if (!callback.is_null()) {
- callback.Run();
- }
+ callback.Run();
pneubeck (no reviews) 2014/04/22 07:16:41 seems unintentional to remove if (!callback.is_n
stevenjb 2014/04/22 19:06:23 Good catch, and you are correct, will do.
network_state_handler_->RequestUpdateForNetwork(service_path);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698