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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2647323010: [Chromecast] Add proxy server support to chromecast (Closed)
Patch Set: Fix unittest failure Created 3 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
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 803661b61faa55cda4250d1341cb03aaf999cd54..25c47d02e05dc218ad988fb5ae743dd3d7cdafb5 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -51,6 +51,7 @@
#include "chromecast/public/cast_sys_info.h"
#include "chromecast/service/cast_service.h"
#include "components/prefs/pref_registry_simple.h"
+#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/gpu_data_manager.h"
@@ -425,16 +426,26 @@ int CastBrowserMainParts::PreCreateThreads() {
void CastBrowserMainParts::PreMainMessageLoopRun() {
scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
metrics::RegisterPrefs(pref_registry.get());
+ PrefProxyConfigTrackerImpl::RegisterPrefs(pref_registry.get());
cast_browser_process_->SetPrefService(
PrefServiceHelper::CreatePrefService(pref_registry.get()));
+ content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::IO)
+ ->PostTask(FROM_HERE,
+ base::Bind(&CastBrowserProcess::SetProxyService,
+ base::Unretained(cast_browser_process_.get())));
+
#if !defined(OS_ANDROID)
memory_pressure_monitor_.reset(new CastMemoryPressureMonitor());
#endif // defined(OS_ANDROID)
cast_browser_process_->SetConnectivityChecker(ConnectivityChecker::Create(
content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::IO)));
+ content::BrowserThread::IO),
+ base::MakeUnique<PrefProxyConfigTrackerImpl>(
+ cast_browser_process_->pref_service(),
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::IO))));
cast_browser_process_->SetNetLog(net_log_.get());

Powered by Google App Engine
This is Rietveld 408576698