| OLD | NEW |
| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // variable is required in order to symbolize stack traces in | 351 // variable is required in order to symbolize stack traces in |
| 352 // Telemetry based tests: http://crbug.com/561763. | 352 // Telemetry based tests: http://crbug.com/561763. |
| 353 if (GetAlternativeCrashDumpLocation(crash_dir)) | 353 if (GetAlternativeCrashDumpLocation(crash_dir)) |
| 354 return true; | 354 return true; |
| 355 | 355 |
| 356 // TODO(scottmg): Consider supporting --user-data-dir. See | 356 // TODO(scottmg): Consider supporting --user-data-dir. See |
| 357 // https://crbug.com/565446. | 357 // https://crbug.com/565446. |
| 358 return install_static::GetDefaultCrashDumpLocation(crash_dir); | 358 return install_static::GetDefaultCrashDumpLocation(crash_dir); |
| 359 } | 359 } |
| 360 | 360 |
| 361 bool ChromeCrashReporterClient::GetCrashMetricsLocation( |
| 362 base::string16* metrics_dir) { |
| 363 return install_static::GetDefaultUserDataDirectory(metrics_dir); |
| 364 } |
| 365 |
| 361 // TODO(ananta) | 366 // TODO(ananta) |
| 362 // This function should be removed when the new crash key map implementation | 367 // This function should be removed when the new crash key map implementation |
| 363 // lands. | 368 // lands. |
| 364 size_t ChromeCrashReporterClient::RegisterCrashKeys() { | 369 size_t ChromeCrashReporterClient::RegisterCrashKeys() { |
| 365 return RegisterCrashKeysHelper(); | 370 return RegisterCrashKeysHelper(); |
| 366 } | 371 } |
| 367 | 372 |
| 368 bool ChromeCrashReporterClient::IsRunningUnattended() { | 373 bool ChromeCrashReporterClient::IsRunningUnattended() { |
| 369 return install_static::HasEnvironmentVariable16(install_static::kHeadless); | 374 return install_static::HasEnvironmentVariable16(install_static::kHeadless); |
| 370 } | 375 } |
| 371 | 376 |
| 372 bool ChromeCrashReporterClient::GetCollectStatsConsent() { | 377 bool ChromeCrashReporterClient::GetCollectStatsConsent() { |
| 373 return install_static::GetCollectStatsConsent(); | 378 return install_static::GetCollectStatsConsent(); |
| 374 } | 379 } |
| 375 | 380 |
| 376 bool ChromeCrashReporterClient::GetCollectStatsInSample() { | 381 bool ChromeCrashReporterClient::GetCollectStatsInSample() { |
| 377 return install_static::GetCollectStatsInSample(); | 382 return install_static::GetCollectStatsInSample(); |
| 378 } | 383 } |
| 379 | 384 |
| 380 bool ChromeCrashReporterClient::EnableBreakpadForProcess( | 385 bool ChromeCrashReporterClient::EnableBreakpadForProcess( |
| 381 const std::string& process_type) { | 386 const std::string& process_type) { |
| 382 return process_type == install_static::kRendererProcess || | 387 return process_type == install_static::kRendererProcess || |
| 383 process_type == install_static::kPpapiPluginProcess || | 388 process_type == install_static::kPpapiPluginProcess || |
| 384 process_type == install_static::kGpuProcess; | 389 process_type == install_static::kGpuProcess; |
| 385 } | 390 } |
| OLD | NEW |