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

Side by Side Diff: chrome/renderer/renderer_main.cc

Issue 6361002: Move SystemMonitor to src/chrome/common.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/plugin/plugin_main.cc ('k') | chrome/utility/utility_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #if defined(OS_MACOSX) 5 #if defined(OS_MACOSX)
6 #include <signal.h> 6 #include <signal.h>
7 #include <unistd.h> 7 #include <unistd.h>
8 #endif // OS_MACOSX 8 #endif // OS_MACOSX
9 9
10 #include "app/hi_res_timer_manager.h"
11 #include "app/system_monitor.h"
12 #include "base/command_line.h" 10 #include "base/command_line.h"
13 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
14 #include "base/mac/scoped_nsautorelease_pool.h" 12 #include "base/mac/scoped_nsautorelease_pool.h"
15 #include "base/metrics/field_trial.h" 13 #include "base/metrics/field_trial.h"
16 #include "base/message_loop.h" 14 #include "base/message_loop.h"
17 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
18 #include "base/metrics/stats_counters.h" 16 #include "base/metrics/stats_counters.h"
19 #include "base/path_service.h" 17 #include "base/path_service.h"
20 #include "base/process_util.h" 18 #include "base/process_util.h"
21 #include "base/string_util.h" 19 #include "base/string_util.h"
22 #include "base/threading/platform_thread.h" 20 #include "base/threading/platform_thread.h"
23 #include "chrome/common/chrome_constants.h" 21 #include "chrome/common/chrome_constants.h"
24 #include "chrome/common/chrome_counters.h" 22 #include "chrome/common/chrome_counters.h"
25 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/hi_res_timer_manager.h"
26 #include "chrome/common/logging_chrome.h" 25 #include "chrome/common/logging_chrome.h"
27 #include "chrome/common/main_function_params.h" 26 #include "chrome/common/main_function_params.h"
28 #include "chrome/common/net/net_resource_provider.h" 27 #include "chrome/common/net/net_resource_provider.h"
29 #include "chrome/common/pepper_plugin_registry.h" 28 #include "chrome/common/pepper_plugin_registry.h"
30 #include "chrome/renderer/renderer_main_platform_delegate.h" 29 #include "chrome/renderer/renderer_main_platform_delegate.h"
31 #include "chrome/renderer/render_process_impl.h" 30 #include "chrome/renderer/render_process_impl.h"
32 #include "chrome/renderer/render_thread.h" 31 #include "chrome/renderer/render_thread.h"
33 #include "grit/generated_resources.h" 32 #include "grit/generated_resources.h"
34 #include "net/base/net_module.h" 33 #include "net/base/net_module.h"
34 #include "ui/base/system_monitor/system_monitor.h"
35 35
36 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
37 #include "base/eintr_wrapper.h" 37 #include "base/eintr_wrapper.h"
38 #include "chrome/app/breakpad_mac.h" 38 #include "chrome/app/breakpad_mac.h"
39 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 39 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
40 #endif // OS_MACOSX 40 #endif // OS_MACOSX
41 41
42 #if defined(USE_LINUX_BREAKPAD) 42 #if defined(USE_LINUX_BREAKPAD)
43 #include "chrome/app/breakpad_linux.h" 43 #include "chrome/app/breakpad_linux.h"
44 #endif 44 #endif
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 233 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
234 #else 234 #else
235 // The main message loop of the renderer services doesn't have IO or UI tasks, 235 // The main message loop of the renderer services doesn't have IO or UI tasks,
236 // unless in-process-plugins is used. 236 // unless in-process-plugins is used.
237 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ? 237 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ?
238 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT); 238 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT);
239 #endif 239 #endif
240 240
241 base::PlatformThread::SetName("CrRendererMain"); 241 base::PlatformThread::SetName("CrRendererMain");
242 242
243 SystemMonitor system_monitor; 243 ui::SystemMonitor system_monitor;
244 HighResolutionTimerManager hi_res_timer_manager; 244 HighResolutionTimerManager hi_res_timer_manager;
245 245
246 platform.PlatformInitialize(); 246 platform.PlatformInitialize();
247 247
248 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); 248 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
249 platform.InitSandboxTests(no_sandbox); 249 platform.InitSandboxTests(no_sandbox);
250 250
251 // Initialize histogram statistics gathering system. 251 // Initialize histogram statistics gathering system.
252 // Don't create StatisticsRecorder in the single process mode. 252 // Don't create StatisticsRecorder in the single process mode.
253 scoped_ptr<base::StatisticsRecorder> statistics; 253 scoped_ptr<base::StatisticsRecorder> statistics;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 pool->Recycle(); 295 pool->Recycle();
296 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); 296 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0);
297 MessageLoop::current()->Run(); 297 MessageLoop::current()->Run();
298 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); 298 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0);
299 } 299 }
300 } 300 }
301 platform.PlatformUninitialize(); 301 platform.PlatformUninitialize();
302 TRACE_EVENT_END("RendererMain", 0, ""); 302 TRACE_EVENT_END("RendererMain", 0, "");
303 return 0; 303 return 0;
304 } 304 }
OLDNEW
« no previous file with comments | « chrome/plugin/plugin_main.cc ('k') | chrome/utility/utility_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698