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

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

Issue 209042: Make Linux Breakpad initialization call to lsb_release asynchronous. Also wrap more... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« chrome/browser/browser_main.cc ('K') | « chrome/chrome.gyp ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "app/resource_bundle.h" 6 #include "app/resource_bundle.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/field_trial.h" 8 #include "base/field_trial.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/platform_thread.h" 12 #include "base/platform_thread.h"
13 #include "base/process_util.h" 13 #include "base/process_util.h"
14 #include "base/scoped_nsautorelease_pool.h" 14 #include "base/scoped_nsautorelease_pool.h"
15 #include "base/stats_counters.h" 15 #include "base/stats_counters.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/system_monitor.h" 17 #include "base/system_monitor.h"
18 #include "chrome/common/chrome_constants.h" 18 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/chrome_counters.h" 19 #include "chrome/common/chrome_counters.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/logging_chrome.h" 21 #include "chrome/common/logging_chrome.h"
22 #include "chrome/common/main_function_params.h" 22 #include "chrome/common/main_function_params.h"
23 #include "chrome/renderer/renderer_main_platform_delegate.h" 23 #include "chrome/renderer/renderer_main_platform_delegate.h"
24 #include "chrome/renderer/render_process.h" 24 #include "chrome/renderer/render_process.h"
25 #include "chrome/renderer/render_thread.h" 25 #include "chrome/renderer/render_thread.h"
26 #include "grit/chromium_strings.h" 26 #include "grit/chromium_strings.h"
27 #include "grit/generated_resources.h" 27 #include "grit/generated_resources.h"
28 28
29 #if defined(OS_LINUX) 29 #if defined(USE_LINUX_BREAKPAD)
30 #include "chrome/app/breakpad_linux.h" 30 #include "chrome/app/breakpad_linux.h"
31 #endif 31 #endif
32 32
33 #if defined(OS_POSIX) 33 #if defined(OS_POSIX)
34 #include <signal.h> 34 #include <signal.h>
35 35
36 static void SigUSR1Handler(int signal) { } 36 static void SigUSR1Handler(int signal) { }
37 #endif 37 #endif
38 38
39 // This function provides some ways to test crash and assertion handling 39 // This function provides some ways to test crash and assertion handling
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 pause(); 74 pause();
75 #endif // defined(OS_POSIX) 75 #endif // defined(OS_POSIX)
76 } 76 }
77 } 77 }
78 78
79 // mainline routine for running as the Renderer process 79 // mainline routine for running as the Renderer process
80 int RendererMain(const MainFunctionParams& parameters) { 80 int RendererMain(const MainFunctionParams& parameters) {
81 const CommandLine& parsed_command_line = parameters.command_line_; 81 const CommandLine& parsed_command_line = parameters.command_line_;
82 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; 82 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_;
83 83
84 #if defined(OS_LINUX) 84 #if defined(USE_LINUX_BREAKPAD)
85 // Needs to be called after we have chrome::DIR_USER_DATA. 85 // Needs to be called after we have chrome::DIR_USER_DATA.
86 InitCrashReporter(); 86 InitCrashReporter();
87 #endif 87 #endif
88 88
89 // This function allows pausing execution using the --renderer-startup-dialog 89 // This function allows pausing execution using the --renderer-startup-dialog
90 // flag allowing us to attach a debugger. 90 // flag allowing us to attach a debugger.
91 // Do not move this function down since that would mean we can't easily debug 91 // Do not move this function down since that would mean we can't easily debug
92 // whatever occurs before it. 92 // whatever occurs before it.
93 HandleRendererErrorTestParameters(parsed_command_line); 93 HandleRendererErrorTestParameters(parsed_command_line);
94 94
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 if (run_loop) { 159 if (run_loop) {
160 if (pool) 160 if (pool)
161 pool->Recycle(); 161 pool->Recycle();
162 MessageLoop::current()->Run(); 162 MessageLoop::current()->Run();
163 } 163 }
164 } 164 }
165 platform.PlatformUninitialize(); 165 platform.PlatformUninitialize();
166 return 0; 166 return 0;
167 } 167 }
OLDNEW
« chrome/browser/browser_main.cc ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698