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

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: Created 5 years, 1 month 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 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
« 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