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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 258008: Move initialization of ChromeURLRequestContexts to the IO thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again, just in case Created 11 years, 2 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: chrome/browser/renderer_host/resource_dispatcher_host.cc
===================================================================
--- chrome/browser/renderer_host/resource_dispatcher_host.cc (revision 29872)
+++ chrome/browser/renderer_host/resource_dispatcher_host.cc (working copy)
@@ -402,8 +402,12 @@
ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
receiver_->GetRequestContext(request_id, request_data));
if (!context) {
- context = static_cast<ChromeURLRequestContext*>(
- Profile::GetDefaultRequestContext());
+ URLRequestContextGetter* context_getter =
+ Profile::GetDefaultRequestContext();
+ if (context_getter) {
+ context = static_cast<ChromeURLRequestContext*>(
+ context_getter->GetURLRequestContext());
+ }
}
if (is_shutdown_ ||
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698