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

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

Issue 2799013002: Monitor crashpad_handler for crashes [sometimes] (Closed)
Patch Set: Address review feedback (scottmg) Created 3 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
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_win.cc ('k') | chrome/common/channel_info_win.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) 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Confirm that an explicit prefetch profile is used for all process types 238 // Confirm that an explicit prefetch profile is used for all process types
239 // except for the browser process. Any new process type will have to assign 239 // except for the browser process. Any new process type will have to assign
240 // itself a prefetch id. See kPrefetchArgument* constants in 240 // itself a prefetch id. See kPrefetchArgument* constants in
241 // content_switches.cc for details. 241 // content_switches.cc for details.
242 DCHECK(process_type.empty() || 242 DCHECK(process_type.empty() ||
243 HasValidWindowsPrefetchArgument(*command_line)); 243 HasValidWindowsPrefetchArgument(*command_line));
244 244
245 if (process_type == crash_reporter::switches::kCrashpadHandler) { 245 if (process_type == crash_reporter::switches::kCrashpadHandler) {
246 crash_reporter::SetupFallbackCrashHandling(*command_line); 246 crash_reporter::SetupFallbackCrashHandling(*command_line);
247 return crash_reporter::RunAsCrashpadHandler( 247 return crash_reporter::RunAsCrashpadHandler(
248 *base::CommandLine::ForCurrentProcess()); 248 *base::CommandLine::ForCurrentProcess(), switches::kProcessType);
249 } else if (process_type == crash_reporter::switches::kFallbackCrashHandler) { 249 } else if (process_type == crash_reporter::switches::kFallbackCrashHandler) {
250 return RunFallbackCrashHandler(*command_line); 250 return RunFallbackCrashHandler(*command_line);
251 } 251 }
252 252
253 const base::TimeTicks exe_entry_point_ticks = base::TimeTicks::Now(); 253 const base::TimeTicks exe_entry_point_ticks = base::TimeTicks::Now();
254 254
255 // Signal Chrome Elf that Chrome has begun to start. 255 // Signal Chrome Elf that Chrome has begun to start.
256 SignalChromeElf(); 256 SignalChromeElf();
257 257
258 // The exit manager is in charge of calling the dtors of singletons. 258 // The exit manager is in charge of calling the dtors of singletons.
259 base::AtExitManager exit_manager; 259 base::AtExitManager exit_manager;
260 260
261 EnableHighDPISupport(); 261 EnableHighDPISupport();
262 262
263 if (AttemptFastNotify(*command_line)) 263 if (AttemptFastNotify(*command_line))
264 return 0; 264 return 0;
265 265
266 RemoveAppCompatFlagsEntry(); 266 RemoveAppCompatFlagsEntry();
267 267
268 // Load and launch the chrome dll. *Everything* happens inside. 268 // Load and launch the chrome dll. *Everything* happens inside.
269 VLOG(1) << "About to load main DLL."; 269 VLOG(1) << "About to load main DLL.";
270 MainDllLoader* loader = MakeMainDllLoader(); 270 MainDllLoader* loader = MakeMainDllLoader();
271 int rc = loader->Launch(instance, exe_entry_point_ticks); 271 int rc = loader->Launch(instance, exe_entry_point_ticks);
272 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 272 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded();
273 delete loader; 273 delete loader;
274 return rc; 274 return rc;
275 } 275 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_win.cc ('k') | chrome/common/channel_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698