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

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

Issue 2732213004: Move FieldTrialRecorder mojom to content (Closed)
Patch Set: review 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" 62 #include "content/browser/broadcast_channel/broadcast_channel_provider.h"
63 #include "content/browser/browser_child_process_host_impl.h" 63 #include "content/browser/browser_child_process_host_impl.h"
64 #include "content/browser/browser_main.h" 64 #include "content/browser/browser_main.h"
65 #include "content/browser/browser_main_loop.h" 65 #include "content/browser/browser_main_loop.h"
66 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 66 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
67 #include "content/browser/cache_storage/cache_storage_context_impl.h" 67 #include "content/browser/cache_storage/cache_storage_context_impl.h"
68 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" 68 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h"
69 #include "content/browser/child_process_security_policy_impl.h" 69 #include "content/browser/child_process_security_policy_impl.h"
70 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 70 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
71 #include "content/browser/dom_storage/dom_storage_message_filter.h" 71 #include "content/browser/dom_storage/dom_storage_message_filter.h"
72 #include "content/browser/field_trial_recorder.h"
72 #include "content/browser/fileapi/fileapi_message_filter.h" 73 #include "content/browser/fileapi/fileapi_message_filter.h"
73 #include "content/browser/frame_host/render_frame_message_filter.h" 74 #include "content/browser/frame_host/render_frame_message_filter.h"
74 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 75 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
75 #include "content/browser/gpu/compositor_util.h" 76 #include "content/browser/gpu/compositor_util.h"
76 #include "content/browser/gpu/gpu_client.h" 77 #include "content/browser/gpu/gpu_client.h"
77 #include "content/browser/gpu/gpu_data_manager_impl.h" 78 #include "content/browser/gpu/gpu_data_manager_impl.h"
78 #include "content/browser/gpu/gpu_process_host.h" 79 #include "content/browser/gpu/gpu_process_host.h"
79 #include "content/browser/gpu/shader_cache_factory.h" 80 #include "content/browser/gpu/shader_cache_factory.h"
80 #include "content/browser/histogram_message_filter.h" 81 #include "content/browser/histogram_message_filter.h"
81 #include "content/browser/image_capture/image_capture_impl.h" 82 #include "content/browser/image_capture/image_capture_impl.h"
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 // Chrome browser process only provides DiscardableSharedMemory service when 1334 // Chrome browser process only provides DiscardableSharedMemory service when
1334 // Chrome is not running in mus+ash. 1335 // Chrome is not running in mus+ash.
1335 if (!service_manager::ServiceManagerIsRemote()) { 1336 if (!service_manager::ServiceManagerIsRemote()) {
1336 discardable_memory::DiscardableSharedMemoryManager* manager = 1337 discardable_memory::DiscardableSharedMemoryManager* manager =
1337 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager(); 1338 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager();
1338 registry->AddInterface( 1339 registry->AddInterface(
1339 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind, 1340 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind,
1340 base::Unretained(manager))); 1341 base::Unretained(manager)));
1341 } 1342 }
1342 1343
1344 AddUIThreadInterface(registry.get(),
1345 base::Bind(&content::FieldTrialRecorder::Create));
1346
1343 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), 1347 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(),
1344 this); 1348 this);
1345 1349
1346 ServiceManagerConnection* service_manager_connection = 1350 ServiceManagerConnection* service_manager_connection =
1347 BrowserContext::GetServiceManagerConnectionFor(browser_context_); 1351 BrowserContext::GetServiceManagerConnectionFor(browser_context_);
1348 std::unique_ptr<ConnectionFilterImpl> connection_filter( 1352 std::unique_ptr<ConnectionFilterImpl> connection_filter(
1349 new ConnectionFilterImpl(child_connection_->child_identity(), 1353 new ConnectionFilterImpl(child_connection_->child_identity(),
1350 std::move(registry))); 1354 std::move(registry)));
1351 connection_filter_controller_ = connection_filter->controller(); 1355 connection_filter_controller_ = connection_filter->controller();
1352 connection_filter_id_ = service_manager_connection->AddConnectionFilter( 1356 connection_filter_id_ = service_manager_connection->AddConnectionFilter(
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3072 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3076 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3073 3077
3074 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3078 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3075 // Capture the error message in a crash key value. 3079 // Capture the error message in a crash key value.
3076 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3080 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3077 bad_message::ReceivedBadMessage(render_process_id, 3081 bad_message::ReceivedBadMessage(render_process_id,
3078 bad_message::RPH_MOJO_PROCESS_ERROR); 3082 bad_message::RPH_MOJO_PROCESS_ERROR);
3079 } 3083 }
3080 3084
3081 } // namespace content 3085 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698