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

Side by Side Diff: chrome/app/chrome_exe_main_win.cc

Issue 2428703002: Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome_elf/chrome_elf.def » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <malloc.h> 6 #include <malloc.h>
7 #include <shellscalingapi.h> 7 #include <shellscalingapi.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <tchar.h> 9 #include <tchar.h>
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 } // namespace 199 } // namespace
200 200
201 #if !defined(WIN_CONSOLE_APP) 201 #if !defined(WIN_CONSOLE_APP)
202 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { 202 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) {
203 #else 203 #else
204 int main() { 204 int main() {
205 HINSTANCE instance = GetModuleHandle(nullptr); 205 HINSTANCE instance = GetModuleHandle(nullptr);
206 #endif 206 #endif
207 SignalInitializeCrashReporting();
208
207 // Initialize the CommandLine singleton from the environment. 209 // Initialize the CommandLine singleton from the environment.
208 base::CommandLine::Init(0, nullptr); 210 base::CommandLine::Init(0, nullptr);
209 const base::CommandLine* command_line = 211 const base::CommandLine* command_line =
210 base::CommandLine::ForCurrentProcess(); 212 base::CommandLine::ForCurrentProcess();
211 213
212 const std::string process_type = 214 const std::string process_type =
213 command_line->GetSwitchValueASCII(switches::kProcessType); 215 command_line->GetSwitchValueASCII(switches::kProcessType);
214 216
215 // Confirm that an explicit prefetch profile is used for all process types 217 // Confirm that an explicit prefetch profile is used for all process types
216 // except for the browser process. Any new process type will have to assign 218 // except for the browser process. Any new process type will have to assign
(...skipping 23 matching lines...) Expand all
240 RemoveAppCompatFlagsEntry(); 242 RemoveAppCompatFlagsEntry();
241 243
242 // Load and launch the chrome dll. *Everything* happens inside. 244 // Load and launch the chrome dll. *Everything* happens inside.
243 VLOG(1) << "About to load main DLL."; 245 VLOG(1) << "About to load main DLL.";
244 MainDllLoader* loader = MakeMainDllLoader(); 246 MainDllLoader* loader = MakeMainDllLoader();
245 int rc = loader->Launch(instance, exe_entry_point_ticks); 247 int rc = loader->Launch(instance, exe_entry_point_ticks);
246 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 248 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded();
247 delete loader; 249 delete loader;
248 return rc; 250 return rc;
249 } 251 }
OLDNEW
« no previous file with comments | « no previous file | chrome_elf/chrome_elf.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698