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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 179923006: Attempting to resolve a race condition with PowerMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 InitializeMainThread(); 442 InitializeMainThread();
443 443
444 { 444 {
445 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor") 445 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor")
446 system_monitor_.reset(new base::SystemMonitor); 446 system_monitor_.reset(new base::SystemMonitor);
447 } 447 }
448 { 448 {
449 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor") 449 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor")
450 scoped_ptr<base::PowerMonitorSource> power_monitor_source( 450 scoped_ptr<base::PowerMonitorSource> power_monitor_source(
451 new base::PowerMonitorDeviceSource()); 451 new base::PowerMonitorDeviceSource());
452 power_monitor_.reset(new base::PowerMonitor(power_monitor_source.Pass())); 452 power_monitor_.reset(
453 base::PowerMonitor::Create(power_monitor_source.Pass()));
453 } 454 }
454 { 455 {
455 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:HighResTimerManager") 456 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:HighResTimerManager")
456 hi_res_timer_manager_.reset(new base::HighResolutionTimerManager); 457 hi_res_timer_manager_.reset(new base::HighResolutionTimerManager);
457 } 458 }
458 { 459 {
459 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier") 460 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier")
460 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); 461 network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
461 } 462 }
462 463
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 base::TimeDelta::FromSeconds(delay_secs)); 1125 base::TimeDelta::FromSeconds(delay_secs));
1125 } 1126 }
1126 1127
1127 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1128 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1128 is_tracing_startup_ = false; 1129 is_tracing_startup_ = false;
1129 TracingController::GetInstance()->DisableRecording( 1130 TracingController::GetInstance()->DisableRecording(
1130 trace_file, TracingController::TracingFileResultCallback()); 1131 trace_file, TracingController::TracingFileResultCallback());
1131 } 1132 }
1132 1133
1133 } // namespace content 1134 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698