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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2785523002: Reduce/remove usage of BrowserThread in content/browser/loader. (Closed)
Patch Set: Remove DCHECK Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 request_context, media_request_context)); 1073 request_context, media_request_context));
1074 1074
1075 // Several filters need the Blob storage context, so fetch it in advance. 1075 // Several filters need the Blob storage context, so fetch it in advance.
1076 scoped_refptr<ChromeBlobStorageContext> blob_storage_context = 1076 scoped_refptr<ChromeBlobStorageContext> blob_storage_context =
1077 ChromeBlobStorageContext::GetFor(browser_context); 1077 ChromeBlobStorageContext::GetFor(browser_context);
1078 1078
1079 resource_message_filter_ = new ResourceMessageFilter( 1079 resource_message_filter_ = new ResourceMessageFilter(
1080 GetID(), storage_partition_impl_->GetAppCacheService(), 1080 GetID(), storage_partition_impl_->GetAppCacheService(),
1081 blob_storage_context.get(), 1081 blob_storage_context.get(),
1082 storage_partition_impl_->GetFileSystemContext(), 1082 storage_partition_impl_->GetFileSystemContext(),
1083 storage_partition_impl_->GetServiceWorkerContext(), 1083 storage_partition_impl_->GetServiceWorkerContext(), get_contexts_callback,
1084 get_contexts_callback); 1084 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1085 1085
1086 AddFilter(resource_message_filter_.get()); 1086 AddFilter(resource_message_filter_.get());
1087 1087
1088 media::AudioManager* audio_manager = 1088 media::AudioManager* audio_manager =
1089 BrowserMainLoop::GetInstance()->audio_manager(); 1089 BrowserMainLoop::GetInstance()->audio_manager();
1090 MediaStreamManager* media_stream_manager = 1090 MediaStreamManager* media_stream_manager =
1091 BrowserMainLoop::GetInstance()->media_stream_manager(); 1091 BrowserMainLoop::GetInstance()->media_stream_manager();
1092 // The AudioInputRendererHost and AudioRendererHost needs to be available for 1092 // The AudioInputRendererHost and AudioRendererHost needs to be available for
1093 // lookup, so it's stashed in a member variable. 1093 // lookup, so it's stashed in a member variable.
1094 audio_input_renderer_host_ = new AudioInputRendererHost( 1094 audio_input_renderer_host_ = new AudioInputRendererHost(
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3072 3072
3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3074 // Capture the error message in a crash key value. 3074 // Capture the error message in a crash key value.
3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3076 bad_message::ReceivedBadMessage(render_process_id, 3076 bad_message::ReceivedBadMessage(render_process_id,
3077 bad_message::RPH_MOJO_PROCESS_ERROR); 3077 bad_message::RPH_MOJO_PROCESS_ERROR);
3078 } 3078 }
3079 3079
3080 } // namespace content 3080 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698