| 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 #if !defined(OS_ANDROID) | 7 #if !defined(OS_ANDROID) |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <sys/prctl.h> | 9 #include <sys/prctl.h> |
| 10 #endif | 10 #endif |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 #if !defined(OS_ANDROID) | 264 #if !defined(OS_ANDROID) |
| 265 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 265 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 266 if (cmd_line->HasSwitch(switches::kEnableCmaMediaPipeline)) | 266 if (cmd_line->HasSwitch(switches::kEnableCmaMediaPipeline)) |
| 267 ::media::SetBrowserCdmFactory(new media::CastBrowserCdmFactory); | 267 ::media::SetBrowserCdmFactory(new media::CastBrowserCdmFactory); |
| 268 #endif // !defined(OS_ANDROID) | 268 #endif // !defined(OS_ANDROID) |
| 269 | 269 |
| 270 cast_browser_process_->SetConnectivityChecker( | 270 cast_browser_process_->SetConnectivityChecker( |
| 271 make_scoped_refptr(new ConnectivityChecker( | 271 make_scoped_refptr(new ConnectivityChecker( |
| 272 content::BrowserThread::GetMessageLoopProxyForThread( | 272 content::BrowserThread::GetMessageLoopProxyForThread( |
| 273 content::BrowserThread::FILE)))); | 273 content::BrowserThread::IO)))); |
| 274 | 274 |
| 275 url_request_context_factory_->InitializeOnUIThread(); | 275 url_request_context_factory_->InitializeOnUIThread(); |
| 276 | 276 |
| 277 cast_browser_process_->SetBrowserContext( | 277 cast_browser_process_->SetBrowserContext( |
| 278 make_scoped_ptr(new CastBrowserContext(url_request_context_factory_))); | 278 make_scoped_ptr(new CastBrowserContext(url_request_context_factory_))); |
| 279 cast_browser_process_->SetMetricsServiceClient( | 279 cast_browser_process_->SetMetricsServiceClient( |
| 280 metrics::CastMetricsServiceClient::Create( | 280 metrics::CastMetricsServiceClient::Create( |
| 281 content::BrowserThread::GetBlockingPool(), | 281 content::BrowserThread::GetBlockingPool(), |
| 282 cast_browser_process_->pref_service(), | 282 cast_browser_process_->pref_service(), |
| 283 cast_browser_process_->browser_context()->GetRequestContext())); | 283 cast_browser_process_->browser_context()->GetRequestContext())); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 #else | 342 #else |
| 343 cast_browser_process_->cast_service()->Finalize(); | 343 cast_browser_process_->cast_service()->Finalize(); |
| 344 cast_browser_process_->metrics_service_client()->Finalize(); | 344 cast_browser_process_->metrics_service_client()->Finalize(); |
| 345 cast_browser_process_.reset(); | 345 cast_browser_process_.reset(); |
| 346 DeregisterKillOnAlarm(); | 346 DeregisterKillOnAlarm(); |
| 347 #endif | 347 #endif |
| 348 } | 348 } |
| 349 | 349 |
| 350 } // namespace shell | 350 } // namespace shell |
| 351 } // namespace chromecast | 351 } // namespace chromecast |
| OLD | NEW |