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 #include "android_webview/native/aw_metrics_log_uploader.h" | 5 #include "android_webview/browser/aw_metrics_log_uploader.h" |
6 | 6 |
7 #include "android_webview/jni/AwMetricsLogUploader_jni.h" | 7 #include "android_webview/jni/AwMetricsLogUploader_jni.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "components/metrics/log_decoder.h" | 9 #include "components/metrics/log_decoder.h" |
10 | 10 |
11 using base::android::ScopedJavaLocalRef; | 11 using base::android::ScopedJavaLocalRef; |
12 using base::android::ToJavaByteArray; | 12 using base::android::ToJavaByteArray; |
13 | 13 |
14 namespace android_webview { | 14 namespace android_webview { |
15 | 15 |
(...skipping 20 matching lines...) Expand all Loading... |
36 env, reinterpret_cast<const uint8_t*>(log_data.data()), log_data.size()); | 36 env, reinterpret_cast<const uint8_t*>(log_data.data()), log_data.size()); |
37 Java_AwMetricsLogUploader_uploadLog(env, java_data); | 37 Java_AwMetricsLogUploader_uploadLog(env, java_data); |
38 | 38 |
39 // The platform mechanism doesn't provide a response code or any way to handle | 39 // The platform mechanism doesn't provide a response code or any way to handle |
40 // failures, so we have nothing to pass to on_upload_complete. Just pass 200 | 40 // failures, so we have nothing to pass to on_upload_complete. Just pass 200 |
41 // (HTTP OK) with error code 0 and pretend everything is peachy. | 41 // (HTTP OK) with error code 0 and pretend everything is peachy. |
42 on_upload_complete_.Run(200, 0); | 42 on_upload_complete_.Run(200, 0); |
43 } | 43 } |
44 | 44 |
45 } // namespace android_webview | 45 } // namespace android_webview |
OLD | NEW |