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

Unified Diff: chromecast/browser/url_request_context_factory.cc

Issue 2647323010: [Chromecast] Add proxy server support to chromecast (Closed)
Patch Set: Update connectivity checker to make it compile on desktop Created 3 years, 11 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
Index: chromecast/browser/url_request_context_factory.cc
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc
index ef726e6dd507f6c9f0611c7b02387bd197f94422..ddc6df9a2da97fb01a26ec72b00ffdc5b99ebf99 100644
--- a/chromecast/browser/url_request_context_factory.cc
+++ b/chromecast/browser/url_request_context_factory.cc
@@ -4,6 +4,7 @@
#include "chromecast/browser/url_request_context_factory.h"
+#include <algorithm>
#include <utility>
#include "base/command_line.h"
@@ -12,8 +13,10 @@
#include "base/memory/ptr_util.h"
#include "base/threading/worker_pool.h"
#include "chromecast/base/chromecast_switches.h"
+#include "chromecast/browser/cast_browser_process.h"
#include "chromecast/browser/cast_http_user_agent_settings.h"
#include "chromecast/browser/cast_network_delegate.h"
+#include "components/proxy_config/pref_proxy_config_tracker.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
@@ -30,6 +33,7 @@
#include "net/http/http_network_layer.h"
#include "net/http/http_server_properties_impl.h"
#include "net/http/http_stream_factory.h"
+#include "net/proxy/proxy_config_service_fixed.h"
wzhong 2017/01/27 23:37:17 Needed?
almasrymina 2017/02/06 22:38:34 Done.
#include "net/proxy/proxy_service.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/default_channel_id_store.h"
@@ -180,12 +184,9 @@ void URLRequestContextFactory::InitializeOnUIThread(net::NetLog* net_log) {
// Proxy config service should be initialized in UI thread, since
// ProxyConfigServiceDelegate on Android expects UI thread.
- proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService(
- content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::IO),
- content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::FILE));
-
+ proxy_config_service_ = CastBrowserProcess::GetInstance()
+ ->pref_proxy_config_tracker()
+ ->CreateTrackingProxyConfigService(nullptr);
net_log_ = net_log;
}

Powered by Google App Engine
This is Rietveld 408576698