Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: android_webview/native/aw_metrics_service_client_impl.h

Issue 2735443003: Use StringPiece for CreateUploader/NetMetricsLogUploader params. (Closed)
Patch Set: Nit and Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/native/aw_metrics_service_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_
6 #define ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_
7 7
8 #include "android_webview/browser/aw_metrics_service_client.h" 8 #include "android_webview/browser/aw_metrics_service_client.h"
9 9
10 #include <jni.h> 10 #include <jni.h>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void SetMetricsClientId(const std::string& client_id) override; 47 void SetMetricsClientId(const std::string& client_id) override;
48 int32_t GetProduct() override; 48 int32_t GetProduct() override;
49 std::string GetApplicationLocale() override; 49 std::string GetApplicationLocale() override;
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 const std::string& server_url, 57 base::StringPiece server_url,
58 const std::string& 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 base::Callback<void(int)>& on_upload_complete) override;
61 base::TimeDelta GetStandardUploadInterval() override; 61 base::TimeDelta GetStandardUploadInterval() override;
62 62
63 private: 63 private:
64 AwMetricsServiceClientImpl(); 64 AwMetricsServiceClientImpl();
65 ~AwMetricsServiceClientImpl() override; 65 ~AwMetricsServiceClientImpl() override;
66 66
67 void InitializeWithGUID(std::string* guid); 67 void InitializeWithGUID(std::string* guid);
68 68
69 bool is_enabled_; 69 bool is_enabled_;
70 PrefService* pref_service_; 70 PrefService* pref_service_;
71 net::URLRequestContextGetter* request_context_; 71 net::URLRequestContextGetter* request_context_;
72 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_; 72 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_;
73 std::unique_ptr<metrics::MetricsService> metrics_service_; 73 std::unique_ptr<metrics::MetricsService> metrics_service_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(AwMetricsServiceClientImpl); 75 DISALLOW_COPY_AND_ASSIGN(AwMetricsServiceClientImpl);
76 }; 76 };
77 77
78 bool RegisterAwMetricsServiceClient(JNIEnv* env); 78 bool RegisterAwMetricsServiceClient(JNIEnv* env);
79 79
80 } // namespace android_webview 80 } // namespace android_webview
81 81
82 #endif // ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_ 82 #endif // ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMPL_
OLDNEW
« no previous file with comments | « no previous file | android_webview/native/aw_metrics_service_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698