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

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

Issue 468005: Improve reporting of subprocess crashes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 WriteIntAttribute("pageloadcount", count); 440 WriteIntAttribute("pageloadcount", count);
441 pref->SetInteger(prefs::kStabilityPageLoadCount, 0); 441 pref->SetInteger(prefs::kStabilityPageLoadCount, 0);
442 } 442 }
443 443
444 count = pref->GetInteger(prefs::kStabilityRendererCrashCount); 444 count = pref->GetInteger(prefs::kStabilityRendererCrashCount);
445 if (count) { 445 if (count) {
446 WriteIntAttribute("renderercrashcount", count); 446 WriteIntAttribute("renderercrashcount", count);
447 pref->SetInteger(prefs::kStabilityRendererCrashCount, 0); 447 pref->SetInteger(prefs::kStabilityRendererCrashCount, 0);
448 } 448 }
449 449
450 count = pref->GetInteger(prefs::kStabilityExtensionRendererCrashCount);
451 if (count) {
452 WriteIntAttribute("extensionrenderercrashcount", count);
jar (doing other things) 2009/12/18 16:28:14 Do you have corresponding changes to the protobuff
asargent_no_longer_on_chrome 2010/01/05 01:01:19 I was under the impression that doing this here is
453 pref->SetInteger(prefs::kStabilityExtensionRendererCrashCount, 0);
454 }
455
450 count = pref->GetInteger(prefs::kStabilityRendererHangCount); 456 count = pref->GetInteger(prefs::kStabilityRendererHangCount);
451 if (count) { 457 if (count) {
452 WriteIntAttribute("rendererhangcount", count); 458 WriteIntAttribute("rendererhangcount", count);
453 pref->SetInteger(prefs::kStabilityRendererHangCount, 0); 459 pref->SetInteger(prefs::kStabilityRendererHangCount, 0);
454 } 460 }
461
462 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount);
463 if (count) {
464 WriteIntAttribute("childprocesscrashcount", count);
465 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0);
466 }
455 } 467 }
456 468
457 void MetricsLog::WritePluginList( 469 void MetricsLog::WritePluginList(
458 const std::vector<WebPluginInfo>& plugin_list) { 470 const std::vector<WebPluginInfo>& plugin_list) {
459 DCHECK(!locked_); 471 DCHECK(!locked_);
460 472
461 OPEN_ELEMENT_FOR_SCOPE("plugins"); 473 OPEN_ELEMENT_FOR_SCOPE("plugins");
462 474
463 for (std::vector<WebPluginInfo>::const_iterator iter = plugin_list.begin(); 475 for (std::vector<WebPluginInfo>::const_iterator iter = plugin_list.begin();
464 iter != plugin_list.end(); ++iter) { 476 iter != plugin_list.end(); ++iter) {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 697
686 for (size_t i = 0; i < histogram.bucket_count(); i++) { 698 for (size_t i = 0; i < histogram.bucket_count(); i++) {
687 if (snapshot.counts(i)) { 699 if (snapshot.counts(i)) {
688 OPEN_ELEMENT_FOR_SCOPE("histogrambucket"); 700 OPEN_ELEMENT_FOR_SCOPE("histogrambucket");
689 WriteIntAttribute("min", histogram.ranges(i)); 701 WriteIntAttribute("min", histogram.ranges(i));
690 WriteIntAttribute("max", histogram.ranges(i + 1)); 702 WriteIntAttribute("max", histogram.ranges(i + 1));
691 WriteIntAttribute("count", snapshot.counts(i)); 703 WriteIntAttribute("count", snapshot.counts(i));
692 } 704 }
693 } 705 }
694 } 706 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.h » ('j') | chrome/browser/metrics/metrics_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698