OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
6 #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 6 #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "components/metrics/metrics_log_uploader.h" |
16 #include "components/metrics/metrics_reporting_default_state.h" | 17 #include "components/metrics/metrics_reporting_default_state.h" |
17 #include "components/metrics/proto/system_profile.pb.h" | 18 #include "components/metrics/proto/system_profile.pb.h" |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class FilePath; | 21 class FilePath; |
21 } | 22 } |
22 | 23 |
23 namespace ukm { | 24 namespace ukm { |
24 class UkmService; | 25 class UkmService; |
25 } | 26 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const base::Closure& done_callback) = 0; | 89 const base::Closure& done_callback) = 0; |
89 | 90 |
90 // Get the URL of the metrics server. | 91 // Get the URL of the metrics server. |
91 virtual std::string GetMetricsServerUrl(); | 92 virtual std::string GetMetricsServerUrl(); |
92 | 93 |
93 // Creates a MetricsLogUploader with the specified parameters (see comments on | 94 // Creates a MetricsLogUploader with the specified parameters (see comments on |
94 // MetricsLogUploader for details). | 95 // MetricsLogUploader for details). |
95 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( | 96 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( |
96 const std::string& server_url, | 97 const std::string& server_url, |
97 const std::string& mime_type, | 98 const std::string& mime_type, |
| 99 metrics::MetricsLogUploader::MetricServiceType service_type, |
98 const base::Callback<void(int)>& on_upload_complete) = 0; | 100 const base::Callback<void(int)>& on_upload_complete) = 0; |
99 | 101 |
100 // Returns the standard interval between upload attempts. | 102 // Returns the standard interval between upload attempts. |
101 virtual base::TimeDelta GetStandardUploadInterval() = 0; | 103 virtual base::TimeDelta GetStandardUploadInterval() = 0; |
102 | 104 |
103 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store | 105 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store |
104 // backups of metrics data. Unused except on Windows. | 106 // backups of metrics data. Unused except on Windows. |
105 virtual base::string16 GetRegistryBackupKey(); | 107 virtual base::string16 GetRegistryBackupKey(); |
106 | 108 |
107 // Called on plugin loading errors. | 109 // Called on plugin loading errors. |
(...skipping 26 matching lines...) Expand all Loading... |
134 | 136 |
135 private: | 137 private: |
136 base::Closure update_running_services_; | 138 base::Closure update_running_services_; |
137 | 139 |
138 DISALLOW_COPY_AND_ASSIGN(MetricsServiceClient); | 140 DISALLOW_COPY_AND_ASSIGN(MetricsServiceClient); |
139 }; | 141 }; |
140 | 142 |
141 } // namespace metrics | 143 } // namespace metrics |
142 | 144 |
143 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 145 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |