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

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

Issue 2732213004: Move FieldTrialRecorder mojom to content (Closed)
Patch Set: initialize FieldTrialList for RenderThreadImplBrowserTest Created 3 years, 9 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
« no previous file with comments | « content/browser/field_trial_recorder.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" 63 #include "content/browser/broadcast_channel/broadcast_channel_provider.h"
64 #include "content/browser/browser_child_process_host_impl.h" 64 #include "content/browser/browser_child_process_host_impl.h"
65 #include "content/browser/browser_main.h" 65 #include "content/browser/browser_main.h"
66 #include "content/browser/browser_main_loop.h" 66 #include "content/browser/browser_main_loop.h"
67 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 67 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
68 #include "content/browser/cache_storage/cache_storage_context_impl.h" 68 #include "content/browser/cache_storage/cache_storage_context_impl.h"
69 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" 69 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h"
70 #include "content/browser/child_process_security_policy_impl.h" 70 #include "content/browser/child_process_security_policy_impl.h"
71 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 71 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
72 #include "content/browser/dom_storage/dom_storage_message_filter.h" 72 #include "content/browser/dom_storage/dom_storage_message_filter.h"
73 #include "content/browser/field_trial_recorder.h"
73 #include "content/browser/fileapi/fileapi_message_filter.h" 74 #include "content/browser/fileapi/fileapi_message_filter.h"
74 #include "content/browser/frame_host/render_frame_message_filter.h" 75 #include "content/browser/frame_host/render_frame_message_filter.h"
75 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 76 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
76 #include "content/browser/gpu/compositor_util.h" 77 #include "content/browser/gpu/compositor_util.h"
77 #include "content/browser/gpu/gpu_client.h" 78 #include "content/browser/gpu/gpu_client.h"
78 #include "content/browser/gpu/gpu_data_manager_impl.h" 79 #include "content/browser/gpu/gpu_data_manager_impl.h"
79 #include "content/browser/gpu/gpu_process_host.h" 80 #include "content/browser/gpu/gpu_process_host.h"
80 #include "content/browser/gpu/shader_cache_factory.h" 81 #include "content/browser/gpu/shader_cache_factory.h"
81 #include "content/browser/histogram_message_filter.h" 82 #include "content/browser/histogram_message_filter.h"
82 #include "content/browser/image_capture/image_capture_impl.h" 83 #include "content/browser/image_capture/image_capture_impl.h"
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 // Chrome browser process only provides DiscardableSharedMemory service when 1338 // Chrome browser process only provides DiscardableSharedMemory service when
1338 // Chrome is not running in mus+ash. 1339 // Chrome is not running in mus+ash.
1339 if (!service_manager::ServiceManagerIsRemote()) { 1340 if (!service_manager::ServiceManagerIsRemote()) {
1340 discardable_memory::DiscardableSharedMemoryManager* manager = 1341 discardable_memory::DiscardableSharedMemoryManager* manager =
1341 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager(); 1342 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager();
1342 registry->AddInterface( 1343 registry->AddInterface(
1343 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind, 1344 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind,
1344 base::Unretained(manager))); 1345 base::Unretained(manager)));
1345 } 1346 }
1346 1347
1348 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create));
1349
1347 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), 1350 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(),
1348 this); 1351 this);
1349 1352
1350 ServiceManagerConnection* service_manager_connection = 1353 ServiceManagerConnection* service_manager_connection =
1351 BrowserContext::GetServiceManagerConnectionFor(browser_context_); 1354 BrowserContext::GetServiceManagerConnectionFor(browser_context_);
1352 std::unique_ptr<ConnectionFilterImpl> connection_filter( 1355 std::unique_ptr<ConnectionFilterImpl> connection_filter(
1353 new ConnectionFilterImpl(child_connection_->child_identity(), 1356 new ConnectionFilterImpl(child_connection_->child_identity(),
1354 std::move(registry))); 1357 std::move(registry)));
1355 connection_filter_controller_ = connection_filter->controller(); 1358 connection_filter_controller_ = connection_filter->controller();
1356 connection_filter_id_ = service_manager_connection->AddConnectionFilter( 1359 connection_filter_id_ = service_manager_connection->AddConnectionFilter(
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3078 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3076 3079
3077 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3080 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3078 // Capture the error message in a crash key value. 3081 // Capture the error message in a crash key value.
3079 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3082 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3080 bad_message::ReceivedBadMessage(render_process_id, 3083 bad_message::ReceivedBadMessage(render_process_id,
3081 bad_message::RPH_MOJO_PROCESS_ERROR); 3084 bad_message::RPH_MOJO_PROCESS_ERROR);
3082 } 3085 }
3083 3086
3084 } // namespace content 3087 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/field_trial_recorder.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698