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

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

Issue 2638433002: Integrate fallback crash handling in chrome (Closed)
Patch Set: Fix signedness comparison goof. Created 3 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
« no previous file with comments | « no previous file | chrome/app/chrome_exe_main_win.cc » ('j') | components/crash/content/app/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // TODO(ananta/scottmg) 5 // TODO(ananta/scottmg)
6 // Add test coverage for Crashpad. 6 // Add test coverage for Crashpad.
7 #include "chrome/app/chrome_crash_reporter_client_win.h" 7 #include "chrome/app/chrome_crash_reporter_client_win.h"
8 8
9 #include <assert.h> 9 #include <assert.h>
10 #include <windows.h> 10 #include <windows.h>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void ChromeCrashReporterClient::InitializeCrashReportingForProcess() { 247 void ChromeCrashReporterClient::InitializeCrashReportingForProcess() {
248 static ChromeCrashReporterClient* instance = nullptr; 248 static ChromeCrashReporterClient* instance = nullptr;
249 if (instance) 249 if (instance)
250 return; 250 return;
251 251
252 instance = new ChromeCrashReporterClient(); 252 instance = new ChromeCrashReporterClient();
253 ANNOTATE_LEAKING_OBJECT_PTR(instance); 253 ANNOTATE_LEAKING_OBJECT_PTR(instance);
254 254
255 std::wstring process_type = install_static::GetSwitchValueFromCommandLine( 255 std::wstring process_type = install_static::GetSwitchValueFromCommandLine(
256 ::GetCommandLine(), install_static::kProcessType); 256 ::GetCommandLine(), install_static::kProcessType);
257 if (process_type != install_static::kCrashpadHandler) { 257 // Don't set up Crashpad crash reporting in the Crashpad handler itself, nor
258 // in the fallback crash handler for the Crashpad handler process.
259 if (process_type != install_static::kCrashpadHandler &&
260 process_type != install_static::kFallbackHandler) {
258 crash_reporter::SetCrashReporterClient(instance); 261 crash_reporter::SetCrashReporterClient(instance);
259 crash_reporter::InitializeCrashpadWithEmbeddedHandler( 262 crash_reporter::InitializeCrashpadWithEmbeddedHandler(
260 process_type.empty(), install_static::UTF16ToUTF8(process_type)); 263 process_type.empty(), install_static::UTF16ToUTF8(process_type));
261 } 264 }
262 } 265 }
263 #endif // NACL_WIN64 266 #endif // NACL_WIN64
264 267
265 bool ChromeCrashReporterClient::GetAlternativeCrashDumpLocation( 268 bool ChromeCrashReporterClient::GetAlternativeCrashDumpLocation(
266 base::string16* crash_dir) { 269 base::string16* crash_dir) {
267 // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate 270 // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 bool ChromeCrashReporterClient::GetCollectStatsInSample() { 400 bool ChromeCrashReporterClient::GetCollectStatsInSample() {
398 return install_static::GetCollectStatsInSample(); 401 return install_static::GetCollectStatsInSample();
399 } 402 }
400 403
401 bool ChromeCrashReporterClient::EnableBreakpadForProcess( 404 bool ChromeCrashReporterClient::EnableBreakpadForProcess(
402 const std::string& process_type) { 405 const std::string& process_type) {
403 // This is not used by Crashpad (at least on Windows). 406 // This is not used by Crashpad (at least on Windows).
404 NOTREACHED(); 407 NOTREACHED();
405 return true; 408 return true;
406 } 409 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/chrome_exe_main_win.cc » ('j') | components/crash/content/app/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698