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 c41035c061524d98028b5dcee76f6f96d6cfdbba..0382b48b413d97983602ae541e45a2ab085fcb2a 100644 |
--- a/chrome/installer/setup/installer_crash_reporting.cc |
+++ b/chrome/installer/setup/installer_crash_reporting.cc |
@@ -4,6 +4,10 @@ |
#include "chrome/installer/setup/installer_crash_reporting.h" |
+#include <iterator> |
+#include <vector> |
+ |
+#include "base/command_line.h" |
#include "base/debug/crash_logging.h" |
#include "base/debug/leak_annotations.h" |
#include "base/logging.h" |
@@ -127,7 +131,10 @@ size_t RegisterCrashKeys() { |
// kLargeSize, which is wasteful.) |
{ kStateKey, crash_keys::kMediumSize }, |
}; |
- return base::debug::InitCrashKeys(&kFixedKeys[0], arraysize(kFixedKeys), |
+ std::vector<base::debug::CrashKey> keys(std::begin(kFixedKeys), |
+ std::end(kFixedKeys)); |
+ crash_keys::GetCrashKeysForCommandLineSwitches(&keys); |
+ return base::debug::InitCrashKeys(keys.data(), keys.size(), |
crash_keys::kChunkMaxLength); |
} |
@@ -146,4 +153,8 @@ void SetInitialCrashKeys(const InstallerState& state) { |
SetCrashKeyValue(kStateKey, base::UTF16ToUTF8(state_key)); |
} |
+void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { |
+ crash_keys::SetSwitchesFromCommandLine(command_line, nullptr); |
+} |
+ |
} // namespace installer |