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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 1332583002: Architecture for cross-process memory notification suppressing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment explaining the use of scoped_ptr in the browser test matcher Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "components/tracing/child_trace_message_filter.h" 32 #include "components/tracing/child_trace_message_filter.h"
33 #include "content/child/child_discardable_shared_memory_manager.h" 33 #include "content/child/child_discardable_shared_memory_manager.h"
34 #include "content/child/child_gpu_memory_buffer_manager.h" 34 #include "content/child/child_gpu_memory_buffer_manager.h"
35 #include "content/child/child_histogram_message_filter.h" 35 #include "content/child/child_histogram_message_filter.h"
36 #include "content/child/child_process.h" 36 #include "content/child/child_process.h"
37 #include "content/child/child_resource_message_filter.h" 37 #include "content/child/child_resource_message_filter.h"
38 #include "content/child/child_shared_bitmap_manager.h" 38 #include "content/child/child_shared_bitmap_manager.h"
39 #include "content/child/fileapi/file_system_dispatcher.h" 39 #include "content/child/fileapi/file_system_dispatcher.h"
40 #include "content/child/fileapi/webfilesystem_impl.h" 40 #include "content/child/fileapi/webfilesystem_impl.h"
41 #include "content/child/geofencing/geofencing_message_filter.h" 41 #include "content/child/geofencing/geofencing_message_filter.h"
42 #include "content/child/memory/child_memory_message_filter.h"
42 #include "content/child/mojo/mojo_application.h" 43 #include "content/child/mojo/mojo_application.h"
43 #include "content/child/notifications/notification_dispatcher.h" 44 #include "content/child/notifications/notification_dispatcher.h"
44 #include "content/child/power_monitor_broadcast_source.h" 45 #include "content/child/power_monitor_broadcast_source.h"
45 #include "content/child/push_messaging/push_dispatcher.h" 46 #include "content/child/push_messaging/push_dispatcher.h"
46 #include "content/child/quota_dispatcher.h" 47 #include "content/child/quota_dispatcher.h"
47 #include "content/child/quota_message_filter.h" 48 #include "content/child/quota_message_filter.h"
48 #include "content/child/resource_dispatcher.h" 49 #include "content/child/resource_dispatcher.h"
49 #include "content/child/service_worker/service_worker_message_filter.h" 50 #include "content/child/service_worker/service_worker_message_filter.h"
50 #include "content/child/thread_safe_sender.h" 51 #include "content/child/thread_safe_sender.h"
51 #include "content/child/websocket_dispatcher.h" 52 #include "content/child/websocket_dispatcher.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 428
428 channel_->AddFilter(histogram_message_filter_.get()); 429 channel_->AddFilter(histogram_message_filter_.get());
429 channel_->AddFilter(resource_message_filter_.get()); 430 channel_->AddFilter(resource_message_filter_.get());
430 channel_->AddFilter(quota_message_filter_->GetFilter()); 431 channel_->AddFilter(quota_message_filter_->GetFilter());
431 channel_->AddFilter(notification_dispatcher_->GetFilter()); 432 channel_->AddFilter(notification_dispatcher_->GetFilter());
432 channel_->AddFilter(push_dispatcher_->GetFilter()); 433 channel_->AddFilter(push_dispatcher_->GetFilter());
433 channel_->AddFilter(service_worker_message_filter_->GetFilter()); 434 channel_->AddFilter(service_worker_message_filter_->GetFilter());
434 channel_->AddFilter(geofencing_message_filter_->GetFilter()); 435 channel_->AddFilter(geofencing_message_filter_->GetFilter());
435 436
436 if (!IsInBrowserProcess()) { 437 if (!IsInBrowserProcess()) {
437 // In single process mode, browser-side tracing will cover the whole 438 // In single process mode, browser-side tracing and memory will cover the
438 // process including renderers. 439 // whole process including renderers.
439 channel_->AddFilter(new tracing::ChildTraceMessageFilter( 440 channel_->AddFilter(new tracing::ChildTraceMessageFilter(
440 ChildProcess::current()->io_task_runner())); 441 ChildProcess::current()->io_task_runner()));
442 channel_->AddFilter(new ChildMemoryMessageFilter());
441 } 443 }
442 444
443 // In single process mode we may already have a power monitor 445 // In single process mode we may already have a power monitor
444 if (!base::PowerMonitor::Get()) { 446 if (!base::PowerMonitor::Get()) {
445 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source( 447 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source(
446 new PowerMonitorBroadcastSource()); 448 new PowerMonitorBroadcastSource());
447 channel_->AddFilter(power_monitor_source->GetMessageFilter()); 449 channel_->AddFilter(power_monitor_source->GetMessageFilter());
448 450
449 power_monitor_.reset(new base::PowerMonitor( 451 power_monitor_.reset(new base::PowerMonitor(
450 power_monitor_source.Pass())); 452 power_monitor_source.Pass()));
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 void ChildThreadImpl::EnsureConnected() { 740 void ChildThreadImpl::EnsureConnected() {
739 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; 741 VLOG(0) << "ChildThreadImpl::EnsureConnected()";
740 base::Process::Current().Terminate(0, false); 742 base::Process::Current().Terminate(0, false);
741 } 743 }
742 744
743 bool ChildThreadImpl::IsInBrowserProcess() const { 745 bool ChildThreadImpl::IsInBrowserProcess() const {
744 return browser_process_io_runner_; 746 return browser_process_io_runner_;
745 } 747 }
746 748
747 } // namespace content 749 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/memory/child_memory_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698