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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1081673004: Chromecast startup race: don't add filter before HostResolver exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicitly do I/O-thread initialization Created 5 years, 8 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
« no previous file with comments | « no previous file | chromecast/browser/cast_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3e623ee0fc7bcb353fbb933d4b18ccdb7d20e871..9873fc0409d45b5cb49c965893b599409083fe4b 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -34,6 +34,7 @@
#include "content/public/common/content_switches.h"
#include "media/base/browser_cdm_factory.h"
#include "media/base/media_switches.h"
+#include "net/url_request/url_request_context_getter.h"
#if defined(OS_ANDROID)
#include "chromecast/crash/android/crash_handler.h"
@@ -273,6 +274,14 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
content::BrowserThread::IO))));
url_request_context_factory_->InitializeOnUIThread();
+ // Forcibly trigger I/O-thread initialization.
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(base::IgnoreResult(
+ &net::URLRequestContextGetter::GetURLRequestContext),
+ base::Unretained(
+ url_request_context_factory_->GetSystemGetter())));
byungchul 2015/04/17 17:56:17 I would call this in CastContentBrowserClient::Ren
gunsch 2015/04/17 18:24:42 SGTM. I think CastContentBrowserClient is the only
cast_browser_process_->SetBrowserContext(
make_scoped_ptr(new CastBrowserContext(url_request_context_factory_)));
« no previous file with comments | « no previous file | chromecast/browser/cast_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698