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

Unified Diff: chrome/installer/setup/installer_crash_reporting.cc

Issue 1478273003: Add an installer crash key for the currently installed version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@installer_crash_keys_cmdline
Patch Set: Rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/setup/installer_crash_reporting.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0382b48b413d97983602ae541e45a2ab085fcb2a..fcecd773a729cf49d90e06bd4ba7facb0d938854 100644
--- a/chrome/installer/setup/installer_crash_reporting.cc
+++ b/chrome/installer/setup/installer_crash_reporting.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/strings/string16.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/installer_state.h"
@@ -26,6 +27,7 @@ namespace {
// Crash Keys
+const char kCurrentVersion[] = "current-version";
const char kDistributionType[] = "dist-type";
const char kIsMultiInstall[] = "multi-install";
const char kIsSystemLevel[] = "system-level";
@@ -120,6 +122,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 },
@@ -157,4 +160,13 @@ void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
crash_keys::SetSwitchesFromCommandLine(command_line, nullptr);
}
+void SetCurrentVersionCrashKey(const base::Version* current_version) {
+ if (current_version) {
+ base::debug::SetCrashKeyValue(kCurrentVersion,
+ current_version->GetString());
+ } else {
+ base::debug::ClearCrashKey(kCurrentVersion);
+ }
+}
+
} // namespace installer
« no previous file with comments | « chrome/installer/setup/installer_crash_reporting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698