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

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

Issue 660883003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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.h" 5 #include "content/child/child_thread.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 ChildProcess::current()->io_message_loop_proxy())); 308 ChildProcess::current()->io_message_loop_proxy()));
309 } 309 }
310 310
311 // In single process mode we may already have a power monitor 311 // In single process mode we may already have a power monitor
312 if (!base::PowerMonitor::Get()) { 312 if (!base::PowerMonitor::Get()) {
313 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source( 313 scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source(
314 new PowerMonitorBroadcastSource()); 314 new PowerMonitorBroadcastSource());
315 channel_->AddFilter(power_monitor_source->GetMessageFilter()); 315 channel_->AddFilter(power_monitor_source->GetMessageFilter());
316 316
317 power_monitor_.reset(new base::PowerMonitor( 317 power_monitor_.reset(new base::PowerMonitor(
318 power_monitor_source.PassAs<base::PowerMonitorSource>())); 318 power_monitor_source.Pass()));
319 } 319 }
320 320
321 #if defined(OS_POSIX) 321 #if defined(OS_POSIX)
322 // Check that --process-type is specified so we don't do this in unit tests 322 // Check that --process-type is specified so we don't do this in unit tests
323 // and single-process mode. 323 // and single-process mode.
324 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessType)) 324 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessType))
325 channel_->AddFilter(new SuicideOnChannelErrorFilter()); 325 channel_->AddFilter(new SuicideOnChannelErrorFilter());
326 #endif 326 #endif
327 327
328 int connection_timeout = kConnectionTimeoutS; 328 int connection_timeout = kConnectionTimeoutS;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 void ChildThread::OnProcessBackgrounded(bool background) { 596 void ChildThread::OnProcessBackgrounded(bool background) {
597 // Set timer slack to maximum on main thread when in background. 597 // Set timer slack to maximum on main thread when in background.
598 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; 598 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE;
599 if (background) 599 if (background)
600 timer_slack = base::TIMER_SLACK_MAXIMUM; 600 timer_slack = base::TIMER_SLACK_MAXIMUM;
601 base::MessageLoop::current()->SetTimerSlack(timer_slack); 601 base::MessageLoop::current()->SetTimerSlack(timer_slack);
602 } 602 }
603 603
604 } // namespace content 604 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_gpu_memory_buffer_manager.cc ('k') | content/child/web_gesture_curve_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698