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..9fd632a01fb7cbb89d32a19a3a61c417016e3de1 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"; |
| +void ProxyConfigServiceImpl::OnSettingsOpCompleted( |
| + SignedSettings::ReturnCode code, |
| + bool value) { |
| 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); |
| + 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(); |
|
xiyuan
2010/12/09 17:55:39
nit: let's move this out of the "if" since we do t
|
| } |
| - retrieve_property_op_ = NULL; |
| } |
| -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 ------------------- |