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

Side by Side Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2647323010: [Chromecast] Add proxy server support to chromecast (Closed)
Patch Set: Fixing test break. 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 unified diff | Download patch
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/url_request_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/cast_browser_main_parts.h" 5 #include "chromecast/browser/cast_browser_main_parts.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chromecast/graphics/cast_window_manager.h" 44 #include "chromecast/graphics/cast_window_manager.h"
45 #include "chromecast/media/base/key_systems_common.h" 45 #include "chromecast/media/base/key_systems_common.h"
46 #include "chromecast/media/base/media_resource_tracker.h" 46 #include "chromecast/media/base/media_resource_tracker.h"
47 #include "chromecast/media/base/video_plane_controller.h" 47 #include "chromecast/media/base/video_plane_controller.h"
48 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" 48 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h"
49 #include "chromecast/net/connectivity_checker.h" 49 #include "chromecast/net/connectivity_checker.h"
50 #include "chromecast/public/cast_media_shlib.h" 50 #include "chromecast/public/cast_media_shlib.h"
51 #include "chromecast/public/cast_sys_info.h" 51 #include "chromecast/public/cast_sys_info.h"
52 #include "chromecast/service/cast_service.h" 52 #include "chromecast/service/cast_service.h"
53 #include "components/prefs/pref_registry_simple.h" 53 #include "components/prefs/pref_registry_simple.h"
54 #include "components/proxy_config/pref_proxy_config_tracker_impl.h"
54 #include "content/public/browser/browser_thread.h" 55 #include "content/public/browser/browser_thread.h"
55 #include "content/public/browser/child_process_security_policy.h" 56 #include "content/public/browser/child_process_security_policy.h"
56 #include "content/public/browser/gpu_data_manager.h" 57 #include "content/public/browser/gpu_data_manager.h"
57 #include "content/public/browser/storage_partition.h" 58 #include "content/public/browser/storage_partition.h"
58 #include "content/public/common/content_switches.h" 59 #include "content/public/common/content_switches.h"
59 #include "device/geolocation/geolocation_delegate.h" 60 #include "device/geolocation/geolocation_delegate.h"
60 #include "device/geolocation/geolocation_provider.h" 61 #include "device/geolocation/geolocation_provider.h"
61 #include "gpu/command_buffer/service/gpu_switches.h" 62 #include "gpu/command_buffer/service/gpu_switches.h"
62 #include "media/base/media.h" 63 #include "media/base/media.h"
63 #include "media/base/media_switches.h" 64 #include "media/base/media_switches.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 #endif 419 #endif
419 420
420 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( 421 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(
421 kChromeResourceScheme); 422 kChromeResourceScheme);
422 return 0; 423 return 0;
423 } 424 }
424 425
425 void CastBrowserMainParts::PreMainMessageLoopRun() { 426 void CastBrowserMainParts::PreMainMessageLoopRun() {
426 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); 427 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
427 metrics::RegisterPrefs(pref_registry.get()); 428 metrics::RegisterPrefs(pref_registry.get());
429 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_registry.get());
428 cast_browser_process_->SetPrefService( 430 cast_browser_process_->SetPrefService(
429 PrefServiceHelper::CreatePrefService(pref_registry.get())); 431 PrefServiceHelper::CreatePrefService(pref_registry.get()));
430 432
431 #if !defined(OS_ANDROID) 433 #if !defined(OS_ANDROID)
432 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor()); 434 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor());
433 #endif // defined(OS_ANDROID) 435 #endif // defined(OS_ANDROID)
434 436
435 cast_browser_process_->SetConnectivityChecker(ConnectivityChecker::Create( 437 cast_browser_process_->SetConnectivityChecker(ConnectivityChecker::Create(
436 content::BrowserThread::GetTaskRunnerForThread( 438 content::BrowserThread::GetTaskRunnerForThread(
437 content::BrowserThread::IO))); 439 content::BrowserThread::IO),
440 url_request_context_factory_->GetSystemGetter()));
438 441
439 cast_browser_process_->SetNetLog(net_log_.get()); 442 cast_browser_process_->SetNetLog(net_log_.get());
440 443
441 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); 444 url_request_context_factory_->InitializeOnUIThread(net_log_.get());
442 445
443 cast_browser_process_->SetBrowserContext( 446 cast_browser_process_->SetBrowserContext(
444 base::MakeUnique<CastBrowserContext>(url_request_context_factory_)); 447 base::MakeUnique<CastBrowserContext>(url_request_context_factory_));
445 cast_browser_process_->SetMetricsServiceClient( 448 cast_browser_process_->SetMetricsServiceClient(
446 metrics::CastMetricsServiceClient::Create( 449 metrics::CastMetricsServiceClient::Create(
447 content::BrowserThread::GetBlockingPool(), 450 content::BrowserThread::GetBlockingPool(),
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 552
550 void CastBrowserMainParts::PostDestroyThreads() { 553 void CastBrowserMainParts::PostDestroyThreads() {
551 #if !defined(OS_ANDROID) 554 #if !defined(OS_ANDROID)
552 media_resource_tracker_->FinalizeAndDestroy(); 555 media_resource_tracker_->FinalizeAndDestroy();
553 media_resource_tracker_ = nullptr; 556 media_resource_tracker_ = nullptr;
554 #endif 557 #endif
555 } 558 }
556 559
557 } // namespace shell 560 } // namespace shell
558 } // namespace chromecast 561 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/url_request_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698