| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer/renderer_histogram_snapshots.h" | 5 #include "chrome/renderer/renderer_histogram_snapshots.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
| 13 #include "chrome/renderer/render_process.h" | |
| 14 #include "content/renderer/render_thread.h" | 13 #include "content/renderer/render_thread.h" |
| 15 | 14 |
| 16 // TODO(raman): Before renderer shuts down send final snapshot lists. | 15 // TODO(raman): Before renderer shuts down send final snapshot lists. |
| 17 | 16 |
| 18 using base::Histogram; | 17 using base::Histogram; |
| 19 using base::StatisticsRecorder; | 18 using base::StatisticsRecorder; |
| 20 | 19 |
| 21 RendererHistogramSnapshots::RendererHistogramSnapshots() | 20 RendererHistogramSnapshots::RendererHistogramSnapshots() |
| 22 : ALLOW_THIS_IN_INITIALIZER_LIST( | 21 : ALLOW_THIS_IN_INITIALIZER_LIST( |
| 23 renderer_histogram_snapshots_factory_(this)) { | 22 renderer_histogram_snapshots_factory_(this)) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void RendererHistogramSnapshots::UniqueInconsistencyDetected(int problem) { | 80 void RendererHistogramSnapshots::UniqueInconsistencyDetected(int problem) { |
| 82 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesRendererUnique", | 81 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesRendererUnique", |
| 83 problem, Histogram::NEVER_EXCEEDED_VALUE); | 82 problem, Histogram::NEVER_EXCEEDED_VALUE); |
| 84 } | 83 } |
| 85 | 84 |
| 86 void RendererHistogramSnapshots::SnapshotProblemResolved(int amount) { | 85 void RendererHistogramSnapshots::SnapshotProblemResolved(int amount) { |
| 87 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotRenderer", | 86 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotRenderer", |
| 88 std::abs(amount)); | 87 std::abs(amount)); |
| 89 } | 88 } |
| 90 | 89 |
| OLD | NEW |