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

Side by Side Diff: chrome/nacl/nacl_main.cc

Issue 431008: Make SystemMonitor not a Singleton and move it out of base (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fix ChromeFrame build Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "chrome/test/injection_test_dll.h" 9 #include "chrome/test/injection_test_dll.h"
10 #include "sandbox/src/sandbox.h" 10 #include "sandbox/src/sandbox.h"
11 #endif 11 #endif
12 12
13 #include "app/hi_res_timer_manager.h"
14 #include "app/system_monitor.h"
13 #include "base/command_line.h" 15 #include "base/command_line.h"
14 #include "base/message_loop.h" 16 #include "base/message_loop.h"
15 #include "base/string_util.h" 17 #include "base/string_util.h"
16 #include "base/system_monitor.h"
17 #include "chrome/common/child_process.h" 18 #include "chrome/common/child_process.h"
18 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/logging_chrome.h" 21 #include "chrome/common/logging_chrome.h"
21 #include "chrome/common/main_function_params.h" 22 #include "chrome/common/main_function_params.h"
22 #include "chrome/nacl/nacl_thread.h" 23 #include "chrome/nacl/nacl_thread.h"
23 24
24 // main() routine for running as the sel_ldr process. 25 // main() routine for running as the sel_ldr process.
25 int NaClMain(const MainFunctionParams& parameters) { 26 int NaClMain(const MainFunctionParams& parameters) {
26 // The main thread of the plugin services IO. 27 // The main thread of the plugin services IO.
27 MessageLoopForIO main_message_loop; 28 MessageLoopForIO main_message_loop;
28 std::wstring app_name = chrome::kBrowserAppName; 29 std::wstring app_name = chrome::kBrowserAppName;
29 PlatformThread::SetName(WideToASCII(app_name + L"_NaClMain").c_str()); 30 PlatformThread::SetName(WideToASCII(app_name + L"_NaClMain").c_str());
30 31
31 // Initialize the SystemMonitor 32 SystemMonitor system_monitor;
32 base::SystemMonitor::Start(); 33 HighResolutionTimerManager hi_res_timer_manager;
33 34
34 #if defined(OS_WIN) 35 #if defined(OS_WIN)
35 const CommandLine& parsed_command_line = parameters.command_line_; 36 const CommandLine& parsed_command_line = parameters.command_line_;
36 37
37 sandbox::TargetServices* target_services = 38 sandbox::TargetServices* target_services =
38 parameters.sandbox_info_.TargetServices(); 39 parameters.sandbox_info_.TargetServices();
39 40
40 DLOG(INFO) << "Started plugin with " << 41 DLOG(INFO) << "Started plugin with " <<
41 parsed_command_line.command_line_string(); 42 parsed_command_line.command_line_string();
42 43
(...skipping 21 matching lines...) Expand all
64 target_services->LowerToken(); 65 target_services->LowerToken();
65 #endif 66 #endif
66 67
67 MessageLoop::current()->Run(); 68 MessageLoop::current()->Run();
68 } 69 }
69 70
70 return 0; 71 return 0;
71 } 72 }
72 73
73 74
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698