OLD | NEW |
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void CastBrowserMainParts::PreMainMessageLoopRun() { | 397 void CastBrowserMainParts::PreMainMessageLoopRun() { |
398 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); | 398 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); |
399 metrics::RegisterPrefs(pref_registry.get()); | 399 metrics::RegisterPrefs(pref_registry.get()); |
400 cast_browser_process_->SetPrefService( | 400 cast_browser_process_->SetPrefService( |
401 PrefServiceHelper::CreatePrefService(pref_registry.get())); | 401 PrefServiceHelper::CreatePrefService(pref_registry.get())); |
402 | 402 |
403 #if !defined(OS_ANDROID) | 403 #if !defined(OS_ANDROID) |
404 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor()); | 404 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor()); |
405 #endif // defined(OS_ANDROID) | 405 #endif // defined(OS_ANDROID) |
406 | 406 |
407 cast_browser_process_->SetConnectivityChecker( | 407 cast_browser_process_->SetConnectivityChecker(ConnectivityChecker::Create( |
408 ConnectivityChecker::Create( | 408 content::BrowserThread::GetTaskRunnerForThread( |
409 content::BrowserThread::GetMessageLoopProxyForThread( | 409 content::BrowserThread::IO))); |
410 content::BrowserThread::IO))); | |
411 | 410 |
412 cast_browser_process_->SetNetLog(net_log_.get()); | 411 cast_browser_process_->SetNetLog(net_log_.get()); |
413 | 412 |
414 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); | 413 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); |
415 | 414 |
416 cast_browser_process_->SetBrowserContext( | 415 cast_browser_process_->SetBrowserContext( |
417 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); | 416 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); |
418 cast_browser_process_->SetMetricsServiceClient( | 417 cast_browser_process_->SetMetricsServiceClient( |
419 metrics::CastMetricsServiceClient::Create( | 418 metrics::CastMetricsServiceClient::Create( |
420 content::BrowserThread::GetBlockingPool(), | 419 content::BrowserThread::GetBlockingPool(), |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 510 |
512 void CastBrowserMainParts::PostDestroyThreads() { | 511 void CastBrowserMainParts::PostDestroyThreads() { |
513 #if !defined(OS_ANDROID) | 512 #if !defined(OS_ANDROID) |
514 media_resource_tracker_->FinalizeAndDestroy(); | 513 media_resource_tracker_->FinalizeAndDestroy(); |
515 media_resource_tracker_ = nullptr; | 514 media_resource_tracker_ = nullptr; |
516 #endif | 515 #endif |
517 } | 516 } |
518 | 517 |
519 } // namespace shell | 518 } // namespace shell |
520 } // namespace chromecast | 519 } // namespace chromecast |
OLD | NEW |