| OLD | NEW |
| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 channel_->AddFilter(sync_message_filter_.get()); | 394 channel_->AddFilter(sync_message_filter_.get()); |
| 395 channel_->AddFilter(resource_message_filter_.get()); | 395 channel_->AddFilter(resource_message_filter_.get()); |
| 396 channel_->AddFilter(quota_message_filter_->GetFilter()); | 396 channel_->AddFilter(quota_message_filter_->GetFilter()); |
| 397 channel_->AddFilter(notification_dispatcher_->GetFilter()); | 397 channel_->AddFilter(notification_dispatcher_->GetFilter()); |
| 398 channel_->AddFilter(push_dispatcher_->GetFilter()); | 398 channel_->AddFilter(push_dispatcher_->GetFilter()); |
| 399 channel_->AddFilter(service_worker_message_filter_->GetFilter()); | 399 channel_->AddFilter(service_worker_message_filter_->GetFilter()); |
| 400 channel_->AddFilter(geofencing_message_filter_->GetFilter()); | 400 channel_->AddFilter(geofencing_message_filter_->GetFilter()); |
| 401 channel_->AddFilter(bluetooth_message_filter_->GetFilter()); | 401 channel_->AddFilter(bluetooth_message_filter_->GetFilter()); |
| 402 channel_->AddFilter(navigator_connect_dispatcher_->GetFilter()); | 402 channel_->AddFilter(navigator_connect_dispatcher_->GetFilter()); |
| 403 | 403 |
| 404 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 404 if (!IsInBrowserProcess()) { |
| 405 switches::kSingleProcess)) { | |
| 406 // In single process mode, browser-side tracing will cover the whole | 405 // In single process mode, browser-side tracing will cover the whole |
| 407 // process including renderers. | 406 // process including renderers. |
| 408 channel_->AddFilter(new tracing::ChildTraceMessageFilter( | 407 channel_->AddFilter(new tracing::ChildTraceMessageFilter( |
| 409 ChildProcess::current()->io_message_loop_proxy())); | 408 ChildProcess::current()->io_message_loop_proxy())); |
| 410 } | 409 } |
| 411 | 410 |
| 412 // In single process mode we may already have a power monitor | 411 // In single process mode we may already have a power monitor |
| 413 if (!base::PowerMonitor::Get()) { | 412 if (!base::PowerMonitor::Get()) { |
| 414 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source( | 413 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source( |
| 415 new PowerMonitorBroadcastSource()); | 414 new PowerMonitorBroadcastSource()); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 // doesn't cause such issues. TODO(gab): Remove this once the experiment is | 748 // doesn't cause such issues. TODO(gab): Remove this once the experiment is |
| 750 // over (http://crbug.com/458594). | 749 // over (http://crbug.com/458594). |
| 751 base::FieldTrial* trial = | 750 base::FieldTrial* trial = |
| 752 base::FieldTrialList::Find("BackgroundRendererProcesses"); | 751 base::FieldTrialList::Find("BackgroundRendererProcesses"); |
| 753 if (trial && trial->group_name() == "AllowBackgroundModeFromRenderer") | 752 if (trial && trial->group_name() == "AllowBackgroundModeFromRenderer") |
| 754 base::Process::Current().SetProcessBackgrounded(background); | 753 base::Process::Current().SetProcessBackgrounded(background); |
| 755 #endif // OS_WIN | 754 #endif // OS_WIN |
| 756 } | 755 } |
| 757 | 756 |
| 758 } // namespace content | 757 } // namespace content |
| OLD | NEW |