Index: components/cronet/android/histogram_manager.h |
diff --git a/components/cronet/android/histogram_manager.h b/components/cronet/android/histogram_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ca5eb62ea964ed0f42531a9563ec74281efb91a5 |
--- /dev/null |
+++ b/components/cronet/android/histogram_manager.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ |
+#define COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ |
+ |
+#include <jni.h> |
+#include <vector> |
+ |
+#include "base/basictypes.h" |
+#include "base/macros.h" |
+ |
+namespace cronet { |
+ |
+bool HistogramManagerRegisterJni(JNIEnv* env); |
+ |
+// A HistogramManager instance is created by Android. It is the central |
+// controller for the acquisition of log data, and the automatic transmission of |
+// that log data to an external server. |
+class HistogramManager { |
Alexei Svitkine (slow)
2014/12/11 20:09:09
Remove? Since its in the metrics component now?
ramant (doing other things)
2014/12/11 20:23:53
Haven't tested this code on cronet. Added GetHist
|
+ public: |
+ HistogramManager(); |
+ ~HistogramManager(); |
+ |
+ // Snapshot all histograms to record the delta into |uma_proto_| and then |
+ // returns the serialized protobuf representation of the record. |
+ std::vector<uint8> GetDeltas(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(HistogramManager); |
+}; |
+ |
+} // namespace cronet |
+ |
+#endif // COMPONENTS_CRONET_ANDROID_CRONET_HISTOGRAM_MANAGER_H_ |