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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 23453032: Chrome.BrowserCrashDumpAttempts needs to account for multiple dumps from the same browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Multi-dump logic was faulty, fixed key proliferation, send smoke signal in filter callback. Created 7 years, 3 months 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
« chrome/app/breakpad_win.cc ('K') | « chrome/app/breakpad_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« chrome/app/breakpad_win.cc ('K') | « chrome/app/breakpad_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698