Chromium Code Reviews| Index: chrome/browser/chromeos/proxy_config_service_impl.cc |
| diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc |
| index 2d272dfe917484de5c97751a9821510cf4ce8d21..2b33c1095026af5e5fd8e0b3280c66d412cd4a2e 100644 |
| --- a/chrome/browser/chromeos/proxy_config_service_impl.cc |
| +++ b/chrome/browser/chromeos/proxy_config_service_impl.cc |
| @@ -489,36 +489,37 @@ bool ProxyConfigServiceImpl::IOGetProxyConfig(net::ProxyConfig* net_config) { |
| return false; |
| } |
| -void ProxyConfigServiceImpl::OnSettingsOpSucceeded(bool value) { |
| - VLOG(1) << "Stored proxy setting to device"; |
| - store_property_op_ = NULL; |
| - if (persist_to_device_pending_) |
| - PersistConfigToDevice(); |
| -} |
| - |
| -void ProxyConfigServiceImpl::OnSettingsOpSucceeded(std::string value) { |
| - VLOG(1) << "Retrieved proxy setting from device, value=[" << value << "]"; |
| - if (reference_config_.Deserialize(value)) { |
| - OnUISetProxyConfig(false); |
| +void ProxyConfigServiceImpl::OnSettingsOpCompleted( |
| + SignedSettings::ReturnCode code, |
| + bool value) { |
| + if (SignedSettings::SUCCESS == code) { |
| + VLOG(1) << "Stored proxy setting to device"; |
| + if (persist_to_device_pending_) |
| + PersistConfigToDevice(); |
| } else { |
| - LOG(WARNING) << "Error deserializing device's proxy setting"; |
| - InitConfigToDefault(true); |
| + LOG(WARNING) << "Error storing proxy setting to device"; |
| + if (persist_to_device_pending_) |
| + PersistConfigToDevice(); |
| } |
| - retrieve_property_op_ = NULL; |
| + store_property_op_ = NULL; |
|
Denis Lagno
2010/12/09 11:54:12
AFAIU you should reset store_property_op_ before c
Chris Masone
2010/12/09 16:33:42
That explains the bug I was seeing as I tested fur
|
| } |
| -void ProxyConfigServiceImpl::OnSettingsOpFailed( |
| - SignedSettings::FailureCode code) { |
| - if (retrieve_property_op_) { |
| +void ProxyConfigServiceImpl::OnSettingsOpCompleted( |
| + SignedSettings::ReturnCode code, |
| + std::string value) { |
| + if (SignedSettings::SUCCESS == code) { |
| + VLOG(1) << "Retrieved proxy setting from device, value=[" << value << "]"; |
| + if (reference_config_.Deserialize(value)) { |
| + OnUISetProxyConfig(false); |
| + } else { |
| + LOG(WARNING) << "Error deserializing device's proxy setting"; |
| + InitConfigToDefault(true); |
| + } |
| + } else { |
| LOG(WARNING) << "Error retrieving proxy setting from device"; |
| InitConfigToDefault(true); |
| - retrieve_property_op_ = NULL; |
| - } else { |
| - LOG(WARNING) << "Error storing proxy setting to device"; |
| - store_property_op_ = NULL; |
| - if (persist_to_device_pending_) |
| - PersistConfigToDevice(); |
| } |
| + retrieve_property_op_ = NULL; |
| } |
| //------------------ ProxyConfigServiceImpl: private methods ------------------- |