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 #ifndef CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ | 5 #ifndef CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ |
6 #define CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ | 6 #define CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/process.h" | 15 #include "base/process.h" |
16 #include "base/task.h" | 16 #include "base/task.h" |
17 #include "chrome/common/metrics_helpers.h" | 17 #include "chrome/common/metrics_helpers.h" |
18 #include "content/renderer/render_process_observer.h" | 18 #include "content/renderer/render_process_observer.h" |
19 | 19 |
20 class RendererHistogramSnapshots : public HistogramSender, | 20 class RendererHistogramSnapshots : public HistogramSender, |
21 public RenderProcessObserver { | 21 public RenderProcessObserver { |
22 public: | 22 public: |
23 RendererHistogramSnapshots(); | 23 RendererHistogramSnapshots(); |
24 ~RendererHistogramSnapshots(); | 24 virtual ~RendererHistogramSnapshots(); |
25 | 25 |
26 // Send the histogram data. | 26 // Send the histogram data. |
27 void SendHistograms(int sequence_number); | 27 void SendHistograms(int sequence_number); |
28 | 28 |
29 private: | 29 private: |
30 // RenderProcessObserver implementation. | 30 // RenderProcessObserver implementation. |
31 virtual bool OnControlMessageReceived(const IPC::Message& message); | 31 virtual bool OnControlMessageReceived(const IPC::Message& message); |
32 | 32 |
33 void OnGetRendererHistograms(int sequence_number); | 33 void OnGetRendererHistograms(int sequence_number); |
34 | 34 |
(...skipping 16 matching lines...) Expand all Loading... |
51 virtual void UniqueInconsistencyDetected(int problem); | 51 virtual void UniqueInconsistencyDetected(int problem); |
52 virtual void SnapshotProblemResolved(int amount); | 52 virtual void SnapshotProblemResolved(int amount); |
53 | 53 |
54 // Collection of histograms to send to the browser. | 54 // Collection of histograms to send to the browser. |
55 HistogramPickledList pickled_histograms_; | 55 HistogramPickledList pickled_histograms_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(RendererHistogramSnapshots); | 57 DISALLOW_COPY_AND_ASSIGN(RendererHistogramSnapshots); |
58 }; | 58 }; |
59 | 59 |
60 #endif // CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ | 60 #endif // CHROME_RENDERER_RENDERER_HISTOGRAM_SNAPSHOTS_H_ |
OLD | NEW |