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

Unified Diff: sync/test/accounts_client/url_request_context_getter.cc

Issue 180283003: Replace the custom ProxyConfigServiceDirect class with the equivalent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync with tip Created 6 years, 10 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 | « chrome/test/chromedriver/net/url_request_context_getter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/accounts_client/url_request_context_getter.cc
===================================================================
--- sync/test/accounts_client/url_request_context_getter.cc (revision 254575)
+++ sync/test/accounts_client/url_request_context_getter.cc (working copy)
@@ -6,27 +6,10 @@
#include <string>
-#include "net/proxy/proxy_config_service.h"
+#include "net/proxy/proxy_config_service_fixed.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
-namespace {
-
-// Config getter that always returns direct settings.
-class ProxyConfigServiceDirect : public net::ProxyConfigService {
- public:
- // Overridden from ProxyConfigService:
- virtual void AddObserver(Observer* observer) OVERRIDE {}
- virtual void RemoveObserver(Observer* observer) OVERRIDE {}
- virtual ConfigAvailability GetLatestProxyConfig(
- net::ProxyConfig* config) OVERRIDE {
- *config = net::ProxyConfig::CreateDirect();
- return CONFIG_VALID;
- }
-};
-
-} // namespace
-
URLRequestContextGetter::URLRequestContextGetter(
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner)
: network_task_runner_(network_task_runner) {
@@ -40,7 +23,8 @@
builder.set_user_agent("sync-test-accounts-client");
builder.DisableHttpCache();
#if defined(OS_LINUX) || defined(OS_ANDROID)
- builder.set_proxy_config_service(new ProxyConfigServiceDirect());
+ builder.set_proxy_config_service(
+ new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()));
#endif
url_request_context_.reset(builder.Build());
}
« no previous file with comments | « chrome/test/chromedriver/net/url_request_context_getter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698