diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/proxy/proxy_config_service_android.cc | 10 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_android.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/net/proxy/proxy_config_service_android.cc b/net/proxy/proxy_config_service_android.cc index e3be5af..86a596c 100644 --- a/net/proxy/proxy_config_service_android.cc +++ b/net/proxy/proxy_config_service_android.cc @@ -16,16 +16,16 @@ void ProxyConfigServiceAndroid::RemoveObserver(Observer* observer) { observers_.RemoveObserver(observer); } -bool ProxyConfigServiceAndroid::GetLatestProxyConfig(ProxyConfig* config) { +ProxyConfigService::ConfigAvailability ProxyConfigServiceAndroid::GetLatestProxyConfig(ProxyConfig* config) { if (!config) - return false; + return ProxyConfigService::CONFIG_UNSET; if (m_proxy.empty()) { *config = ProxyConfig::CreateDirect(); } else { config->proxy_rules().ParseFromString(m_proxy); } - return true; + return ProxyConfigService::CONFIG_VALID; } void ProxyConfigServiceAndroid::UpdateProxySettings(std::string& proxy, @@ -44,7 +44,9 @@ void ProxyConfigServiceAndroid::UpdateProxySettings(std::string& proxy, } config.proxy_rules().bypass_rules.AddRuleFromString(exList); - FOR_EACH_OBSERVER(Observer, observers_, OnProxyConfigChanged(config)); + FOR_EACH_OBSERVER(Observer, observers_, + OnProxyConfigChanged(config, + ProxyConfigService::CONFIG_VALID)); } } // namespace net diff --git a/net/proxy/proxy_config_service_android.h b/net/proxy/proxy_config_service_android.h index dc89c07..d4abfac 100644 --- a/net/proxy/proxy_config_service_android.h +++ b/net/proxy/proxy_config_service_android.h @@ -19,7 +19,7 @@ class ProxyConfigServiceAndroid : public ProxyConfigService { // ProxyConfigService implementation: virtual void AddObserver(Observer* observer); virtual void RemoveObserver(Observer* observer); - virtual bool GetLatestProxyConfig(ProxyConfig* config); + virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config); virtual void OnLazyPoll() {} // For Android to update the proxy service config |