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

Side by Side 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: 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 unified diff | Download patch
« chrome/app/breakpad_win.cc ('K') | « chrome/app/breakpad_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It is 10 // A MetricsService instance is typically created at application startup. It is
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 return; 808 return;
809 } 809 }
810 810
811 base::string16 temp_name; 811 base::string16 temp_name;
812 DWORD temp_value = 0; 812 DWORD temp_value = 0;
813 int crash_dump_attempts = 0; 813 int crash_dump_attempts = 0;
814 for (int i = regkey.GetValueCount() - 1; i >= 0; --i) { 814 for (int i = regkey.GetValueCount() - 1; i >= 0; --i) {
815 if (regkey.GetValueNameAt(i, &temp_name) == ERROR_SUCCESS && 815 if (regkey.GetValueNameAt(i, &temp_name) == ERROR_SUCCESS &&
816 regkey.ReadValueDW(temp_name.c_str(), &temp_value) == ERROR_SUCCESS) { 816 regkey.ReadValueDW(temp_name.c_str(), &temp_value) == ERROR_SUCCESS) {
817 regkey.DeleteValue(temp_name.c_str()); 817 regkey.DeleteValue(temp_name.c_str());
818 if (temp_value != 0) 818 crash_dump_attempts += temp_value;
819 ++crash_dump_attempts;
820 } 819 }
821 } 820 }
822 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", crash_dump_attempts); 821 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", crash_dump_attempts);
823 } 822 }
824 #endif // defined(OS_WIN) 823 #endif // defined(OS_WIN)
825 824
826 //------------------------------------------------------------------------------ 825 //------------------------------------------------------------------------------
827 // private methods 826 // private methods
828 //------------------------------------------------------------------------------ 827 //------------------------------------------------------------------------------
829 828
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 if (local_state) { 1778 if (local_state) {
1780 const PrefService::Preference* uma_pref = 1779 const PrefService::Preference* uma_pref =
1781 local_state->FindPreference(prefs::kMetricsReportingEnabled); 1780 local_state->FindPreference(prefs::kMetricsReportingEnabled);
1782 if (uma_pref) { 1781 if (uma_pref) {
1783 bool success = uma_pref->GetValue()->GetAsBoolean(&result); 1782 bool success = uma_pref->GetValue()->GetAsBoolean(&result);
1784 DCHECK(success); 1783 DCHECK(success);
1785 } 1784 }
1786 } 1785 }
1787 return result; 1786 return result;
1788 } 1787 }
OLDNEW
« 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