Chromium Code Reviews| Index: android_webview/native/aw_metrics_log_uploader.h |
| diff --git a/android_webview/native/aw_metrics_log_uploader.h b/android_webview/native/aw_metrics_log_uploader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a9fc26e44db16c0966da8b10f34f62c6bb452a34 |
| --- /dev/null |
| +++ b/android_webview/native/aw_metrics_log_uploader.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2017 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 ANDROID_WEBVIEW_NATIVE_AW_METRICS_LOG_UPLOADER_H_ |
| +#define ANDROID_WEBVIEW_NATIVE_AW_METRICS_LOG_UPLOADER_H_ |
| + |
| +#include <jni.h> |
| +#include <string> |
| + |
| +#include "components/metrics/simple_metrics_log_uploader.h" |
| + |
| +namespace android_webview { |
| + |
| +// WebView uses the platform logging mechanism instead of the normal UMA |
| +// server. The platform mechanism does its own compression, so we use |
| +// SimpleMetricslogUploader. |
| +class AwMetricsLogUploader : public ::metrics::SimpleMetricsLogUploader { |
| + public: |
| + explicit AwMetricsLogUploader( |
| + const base::Callback<void(int)>& on_upload_complete); |
|
Alexei Svitkine (slow)
2017/03/29 17:32:23
Nit: Add an explicit dtor and leave an empty line
paulmiller
2017/03/29 18:33:28
Will do. What's the reason for the explicit destru
|
| + void UploadLog(const std::string& uncompressed_log_data) override; |
| + |
| + private: |
| + const base::Callback<void(int)> on_upload_complete_; |
|
michaelbai
2017/03/29 01:29:55
add DISALLOW_COPY_AND_ASSIGN()?
paulmiller
2017/03/29 18:33:28
Will do.
|
| +}; |
| + |
| +bool RegisterAwMetricsLogUploader(JNIEnv* env); |
| + |
| +} // namespace android_webview |
| + |
| +#endif // ANDROID_WEBVIEW_NATIVE_AW_METRICS_LOG_UPLOADER_H_ |