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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 108683003: Store gpu crashes in the systemprofileproto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei comments1 Created 7 years 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
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 #include "chrome/browser/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 stability->set_renderer_hang_count(count); 644 stability->set_renderer_hang_count(count);
645 pref->SetInteger(prefs::kStabilityRendererHangCount, 0); 645 pref->SetInteger(prefs::kStabilityRendererHangCount, 0);
646 } 646 }
647 647
648 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount); 648 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount);
649 if (count) { 649 if (count) {
650 stability->set_child_process_crash_count(count); 650 stability->set_child_process_crash_count(count);
651 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0); 651 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0);
652 } 652 }
653 653
654 count = pref->GetInteger(prefs::kStabilityGpuCrashCount);
655 if (count) {
656 stability->set_gpu_crash_count(count);
657 pref->SetInteger(prefs::kStabilityGpuCrashCount, 0);
658 }
659
654 #if defined(OS_CHROMEOS) 660 #if defined(OS_CHROMEOS)
655 count = pref->GetInteger(prefs::kStabilityOtherUserCrashCount); 661 count = pref->GetInteger(prefs::kStabilityOtherUserCrashCount);
656 if (count) { 662 if (count) {
657 stability->set_other_user_crash_count(count); 663 stability->set_other_user_crash_count(count);
658 pref->SetInteger(prefs::kStabilityOtherUserCrashCount, 0); 664 pref->SetInteger(prefs::kStabilityOtherUserCrashCount, 0);
659 } 665 }
660 666
661 count = pref->GetInteger(prefs::kStabilityKernelCrashCount); 667 count = pref->GetInteger(prefs::kStabilityKernelCrashCount);
662 if (count) { 668 if (count) {
663 stability->set_kernel_crash_count(count); 669 stability->set_kernel_crash_count(count);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 1009
1004 // We invalidate the user count if it changed while the log was open. 1010 // We invalidate the user count if it changed while the log was open.
1005 if (system_profile->has_multi_profile_user_count() && 1011 if (system_profile->has_multi_profile_user_count() &&
1006 user_count != system_profile->multi_profile_user_count()) 1012 user_count != system_profile->multi_profile_user_count())
1007 user_count = 0; 1013 user_count = 0;
1008 1014
1009 system_profile->set_multi_profile_user_count(user_count); 1015 system_profile->set_multi_profile_user_count(user_count);
1010 } 1016 }
1011 } 1017 }
1012 #endif 1018 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | chrome/browser/metrics/metrics_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698