Index: chrome/browser/metrics/metrics_service.cc |
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc |
index b356a00dbb3d2c85966f560613760558055b2810..230035b0d874d2148ebdac5bbdc2aa1ca22c0c8b 100644 |
--- a/chrome/browser/metrics/metrics_service.cc |
+++ b/chrome/browser/metrics/metrics_service.cc |
@@ -797,26 +797,24 @@ void MetricsService::RecordBreakpadHasDebugger(bool has_debugger) { |
#if defined(OS_WIN) |
void MetricsService::CountBrowserCrashDumpAttempts() { |
- base::string16 key_str(chrome::kBrowserCrashDumpAttemptsRegistryPath); |
- key_str += L"\\"; |
- key_str += UTF8ToWide(chrome::kChromeVersion); |
- |
base::win::RegKey regkey; |
if (regkey.Open(HKEY_CURRENT_USER, |
- key_str.c_str(), |
+ chrome::kBrowserCrashDumpAttemptsRegistryPath, |
KEY_ALL_ACCESS) != ERROR_SUCCESS) { |
return; |
} |
+ base::string16 chrome_version(base::ASCIIToUTF16(chrome::kChromeVersion)); |
+ |
base::string16 temp_name; |
DWORD temp_value = 0; |
int crash_dump_attempts = 0; |
for (int i = regkey.GetValueCount() - 1; i >= 0; --i) { |
if (regkey.GetValueNameAt(i, &temp_name) == ERROR_SUCCESS && |
grt (UTC plus 2)
2013/09/06 15:53:23
i don't think that this will work the way you hope
Roger McFarlane (Chromium)
2013/09/10 19:43:44
I've done as you suggest per the walkthrough and d
|
+ StartsWith(temp_name, chrome_version, false) && |
grt (UTC plus 2)
2013/09/06 15:53:23
how about also deleting the values for older versi
Roger McFarlane (Chromium)
2013/09/10 19:43:44
Hmm...
That would be wonky in multi-install, whic
|
regkey.ReadValueDW(temp_name.c_str(), &temp_value) == ERROR_SUCCESS) { |
regkey.DeleteValue(temp_name.c_str()); |
- if (temp_value != 0) |
- ++crash_dump_attempts; |
+ crash_dump_attempts += temp_value; |
} |
} |
UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", crash_dump_attempts); |