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

Side by Side Diff: components/nacl/loader/nacl_helper_win_64.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/power_monitor/power_monitor.h" 8 #include "base/power_monitor/power_monitor.h"
9 #include "base/power_monitor/power_monitor_device_source.h" 9 #include "base/power_monitor/power_monitor_device_source.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace { 26 namespace {
27 // main() routine for the NaCl broker process. 27 // main() routine for the NaCl broker process.
28 // This is necessary for supporting NaCl in Chrome on Win64. 28 // This is necessary for supporting NaCl in Chrome on Win64.
29 int NaClBrokerMain(const content::MainFunctionParams& parameters) { 29 int NaClBrokerMain(const content::MainFunctionParams& parameters) {
30 base::MessageLoopForIO main_message_loop; 30 base::MessageLoopForIO main_message_loop;
31 base::PlatformThread::SetName("CrNaClBrokerMain"); 31 base::PlatformThread::SetName("CrNaClBrokerMain");
32 32
33 scoped_ptr<base::PowerMonitorSource> power_monitor_source( 33 scoped_ptr<base::PowerMonitorSource> power_monitor_source(
34 new base::PowerMonitorDeviceSource()); 34 new base::PowerMonitorDeviceSource());
35 base::PowerMonitor power_monitor(power_monitor_source.Pass()); 35 base::PowerMonitor::Initialize(power_monitor_source.Pass());
36 base::HighResolutionTimerManager hi_res_timer_manager; 36 base::HighResolutionTimerManager hi_res_timer_manager;
37 37
38 NaClBrokerListener listener; 38 NaClBrokerListener listener;
39 listener.Listen(); 39 listener.Listen();
40 40
41 return 0; 41 return 0;
42 } 42 }
43 43
44 } // namespace 44 } // namespace
45 45
(...skipping 28 matching lines...) Expand all
74 return NaClMain(main_params); 74 return NaClMain(main_params);
75 75
76 if (process_type == switches::kNaClBrokerProcess) 76 if (process_type == switches::kNaClBrokerProcess)
77 return NaClBrokerMain(main_params); 77 return NaClBrokerMain(main_params);
78 78
79 CHECK(false) << "Unknown NaCl 64 process."; 79 CHECK(false) << "Unknown NaCl 64 process.";
80 return -1; 80 return -1;
81 } 81 }
82 82
83 } // namespace nacl 83 } // namespace nacl
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router_forwarder_unittest.cc ('k') | components/nacl/loader/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698