Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ | |
| 6 #define COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/basictypes.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" | |
| 16 | |
| 17 namespace base { | |
| 18 class HistogramBase; | |
| 19 class HistogramBase::Inconsistency | |
| 20 class HistogramSamples; | |
| 21 class HistogramSnapshotManager; | |
|
Alexei Svitkine (slow)
2014/12/10 15:19:31
If these all come from the methods you're overridi
ramant (doing other things)
2014/12/10 22:27:51
Done.
| |
| 22 } // namespace base | |
| 23 | |
| 24 namespace cronet { | |
| 25 | |
| 26 bool HistogramManagerRegisterJni(JNIEnv* env); | |
| 27 | |
| 28 class HistogramManager : public base::HistogramFlattener { | |
|
Alexei Svitkine (slow)
2014/12/10 15:19:31
Add a basic comment to the class.
ramant (doing other things)
2014/12/10 22:27:51
Done.
| |
| 29 public: | |
| 30 HistogramManager(); | |
| 31 ~HistogramManager(); | |
| 32 | |
| 33 // --------------------------- | |
| 34 // HistogramFlattener methods: | |
| 35 // --------------------------- | |
| 36 void RecordDelta(const base::HistogramBase& histogram, | |
| 37 const base::HistogramSamples& snapshot) override; | |
| 38 void InconsistencyDetected( | |
| 39 base::HistogramBase::Inconsistency problem) override; | |
| 40 void UniqueInconsistencyDetected( | |
| 41 base::HistogramBase::Inconsistency problem) override; | |
| 42 void InconsistencyDetectedInLoggedCount(int amount) override; | |
| 43 | |
| 44 void PrepareDeltas(); | |
| 45 | |
| 46 const metrics::ChromeUserMetricsExtension& uma_proto() const { | |
| 47 return uma_proto_; | |
| 48 } | |
| 49 | |
| 50 private: | |
| 51 void RecordHistogramDelta(const std::string& histogram_name, | |
| 52 const base::HistogramSamples& snapshot); | |
| 53 | |
| 54 base::HistogramSnapshotManager histogram_snapshot_manager_; | |
| 55 | |
| 56 // Stores the protocol buffer representation for this log. | |
| 57 metrics::ChromeUserMetricsExtension uma_proto_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(HistogramManager); | |
| 60 }; | |
| 61 | |
| 62 } // namespace cronet | |
| 63 | |
| 64 #endif // COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ | |
| OLD | NEW |