diff --git a/net/proxy/proxy_config_service_android.cc b/net/proxy/proxy_config_service_android.cc index 990b614fb8bfa..1ce3fa38f9d55 100644 --- a/net/proxy/proxy_config_service_android.cc +++ b/net/proxy/proxy_config_service_android.cc @@ -411,4 +411,12 @@ void ProxyConfigServiceAndroid::ProxySettingsChanged() { delegate_->ProxySettingsChanged(); } +void ProxyConfigServiceAndroid::ProxySettingsChangedTo( + const std::string& host, + int port, + const std::string& pac_url, + const std::vector& exclusion_list) { + delegate_->ProxySettingsChangedTo(host, port, pac_url, exclusion_list); +} + } // namespace net diff --git a/net/proxy/proxy_config_service_android.h b/net/proxy/proxy_config_service_android.h index 1b45eb102deb8..4706004cbca17 100644 --- a/net/proxy/proxy_config_service_android.h +++ b/net/proxy/proxy_config_service_android.h @@ -6,6 +6,7 @@ #define NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ #include +#include #include "base/android/jni_android.h" #include "base/callback_forward.h" @@ -78,6 +79,13 @@ class NET_EXPORT ProxyConfigServiceAndroid : public ProxyConfigService { void RemoveObserver(Observer* observer) override; ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override; + void ProxySettingsChanged(); + void ProxySettingsChangedTo( + const std::string& host, + int port, + const std::string& pac_url, + const std::vector& exclusion_list); + private: friend class ProxyConfigServiceAndroidTestBase; class Delegate; @@ -88,9 +96,6 @@ class NET_EXPORT ProxyConfigServiceAndroid : public ProxyConfigService { const scoped_refptr& jni_task_runner, GetPropertyCallback get_property_callback); - // For tests. - void ProxySettingsChanged(); - scoped_refptr delegate_; DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index 01bc3bb25db26..9a9185300cd75 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -1475,6 +1475,11 @@ ProxyService::State ProxyService::ResetProxyConfig(bool reset_fetched_config) { return previous_state; } +ProxyConfigService* ProxyService::GetProxyConfigService() const { + DCHECK(CalledOnValidThread()); + return config_service_.get(); +} + void ProxyService::ResetConfigService( scoped_ptr new_proxy_config_service) { DCHECK(CalledOnValidThread()); diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h index 8cd707144ddfd..351ccec7744cb 100644 --- a/net/proxy/proxy_service.h +++ b/net/proxy/proxy_service.h @@ -215,6 +215,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver, // ResolveProxy calls. void ResetConfigService( scoped_ptr new_proxy_config_service); + ProxyConfigService* GetProxyConfigService() const; // Returns the last configuration fetched from ProxyConfigService. const ProxyConfig& fetched_config() {