Chromium Code Reviews| Index: chrome/installer/setup/installer_crash_reporting.cc |
| diff --git a/chrome/installer/setup/installer_crash_reporting.cc b/chrome/installer/setup/installer_crash_reporting.cc |
| index 03deb929008e002c93ba7f65b25883521e0eedd8..880e77b6aea1b4e88ff65cecc6586827ee53e8cb 100644 |
| --- a/chrome/installer/setup/installer_crash_reporting.cc |
| +++ b/chrome/installer/setup/installer_crash_reporting.cc |
| @@ -8,8 +8,10 @@ |
| #include "base/debug/leak_annotations.h" |
| #include "base/logging.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "base/version.h" |
| #include "chrome/installer/setup/installer_crash_reporter_client.h" |
| #include "chrome/installer/util/google_update_settings.h" |
| +#include "chrome/installer/util/installation_state.h" |
|
grt (UTC plus 2)
2015/11/27 19:04:24
nit: unused
|
| #include "chrome/installer/util/installer_state.h" |
| #include "components/crash/content/app/breakpad_win.h" |
| #include "components/crash/content/app/crash_keys_win.h" |
| @@ -21,6 +23,7 @@ namespace { |
| // Crash Keys |
| +const char kCurrentVersion[] = "current-version"; |
| const char kDistributionType[] = "dist-type"; |
| const char kIsMultiInstall[] = "multi-install"; |
| const char kIsSystemLevel[] = "system-level"; |
| @@ -115,6 +118,7 @@ void ConfigureCrashReporting(const InstallerState& installer_state) { |
| size_t RegisterCrashKeys() { |
| const base::debug::CrashKey kFixedKeys[] = { |
| { crash_keys::kClientId, crash_keys::kSmallSize }, |
| + { kCurrentVersion, crash_keys::kSmallSize }, |
| { kDistributionType, crash_keys::kSmallSize }, |
| { kIsMultiInstall, crash_keys::kSmallSize }, |
| { kIsSystemLevel, crash_keys::kSmallSize }, |
| @@ -152,4 +156,13 @@ void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { |
| crash_keys::SetSwitchesFromCommandLine(command_line); |
| } |
| +void SetCurrentVersionCrashKey(const base::Version* current_version) { |
| + if (current_version) { |
| + base::debug::SetCrashKeyValue(kCurrentVersion, |
| + current_version->GetString()); |
| + } else { |
| + base::debug::ClearCrashKey(kCurrentVersion); |
| + } |
| +} |
| + |
| } // namespace installer |