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

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: Win64 fixes Created 6 years, 8 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
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 base::PowerMonitor::Initialize(power_monitor_source.Pass());
453 } 453 }
454 { 454 {
455 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:HighResTimerManager") 455 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:HighResTimerManager")
456 hi_res_timer_manager_.reset(new base::HighResolutionTimerManager); 456 hi_res_timer_manager_.reset(new base::HighResolutionTimerManager);
457 } 457 }
458 { 458 {
459 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier") 459 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier")
460 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); 460 network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
461 } 461 }
462 462
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 base::TimeDelta::FromSeconds(delay_secs)); 1123 base::TimeDelta::FromSeconds(delay_secs));
1124 } 1124 }
1125 1125
1126 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1126 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1127 is_tracing_startup_ = false; 1127 is_tracing_startup_ = false;
1128 TracingController::GetInstance()->DisableRecording( 1128 TracingController::GetInstance()->DisableRecording(
1129 trace_file, TracingController::TracingFileResultCallback()); 1129 trace_file, TracingController::TracingFileResultCallback());
1130 } 1130 }
1131 1131
1132 } // namespace content 1132 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/power_monitor_message_broadcaster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698