| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 bool GetBrand(std::string* brand_code) override; | 50 bool GetBrand(std::string* brand_code) override; |
| 51 metrics::SystemProfileProto::Channel GetChannel() override; | 51 metrics::SystemProfileProto::Channel GetChannel() override; |
| 52 std::string GetVersionString() override; | 52 std::string GetVersionString() override; |
| 53 void InitializeSystemProfileMetrics( | 53 void InitializeSystemProfileMetrics( |
| 54 const base::Closure& done_callback) override; | 54 const base::Closure& done_callback) override; |
| 55 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 55 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
| 56 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( | 56 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( |
| 57 base::StringPiece server_url, | 57 base::StringPiece server_url, |
| 58 base::StringPiece mime_type, | 58 base::StringPiece mime_type, |
| 59 metrics::MetricsLogUploader::MetricServiceType service_type, | 59 metrics::MetricsLogUploader::MetricServiceType service_type, |
| 60 const base::Callback<void(int)>& on_upload_complete) override; | 60 const metrics::MetricsLogUploader::UploadCallback& on_upload_complete) |
| 61 override; |
| 61 base::TimeDelta GetStandardUploadInterval() override; | 62 base::TimeDelta GetStandardUploadInterval() override; |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 AwMetricsServiceClientImpl(); | 65 AwMetricsServiceClientImpl(); |
| 65 ~AwMetricsServiceClientImpl() override; | 66 ~AwMetricsServiceClientImpl() override; |
| 66 | 67 |
| 67 void InitializeWithGUID(std::string* guid); | 68 void InitializeWithGUID(std::string* guid); |
| 68 | 69 |
| 69 bool is_enabled_; | 70 bool is_enabled_; |
| 70 PrefService* pref_service_; | 71 PrefService* pref_service_; |
| 71 net::URLRequestContextGetter* request_context_; | 72 net::URLRequestContextGetter* request_context_; |
| 72 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_; | 73 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_; |
| 73 std::unique_ptr<metrics::MetricsService> metrics_service_; | 74 std::unique_ptr<metrics::MetricsService> metrics_service_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(AwMetricsServiceClientImpl); | 76 DISALLOW_COPY_AND_ASSIGN(AwMetricsServiceClientImpl); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 bool RegisterAwMetricsServiceClient(JNIEnv* env); | 79 bool RegisterAwMetricsServiceClient(JNIEnv* env); |
| 79 | 80 |
| 80 } // namespace android_webview | 81 } // namespace android_webview |
| 81 | 82 |
| 82 #endif // ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ | 83 #endif // ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_H_ |
| OLD | NEW |