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> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 // Get the URL of the metrics server. | 91 // Get the URL of the metrics server. |
92 virtual std::string GetMetricsServerUrl(); | 92 virtual std::string GetMetricsServerUrl(); |
93 | 93 |
94 // Creates a MetricsLogUploader with the specified parameters (see comments on | 94 // Creates a MetricsLogUploader with the specified parameters (see comments on |
95 // MetricsLogUploader for details). | 95 // MetricsLogUploader for details). |
96 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( | 96 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( |
97 base::StringPiece server_url, | 97 base::StringPiece server_url, |
98 base::StringPiece mime_type, | 98 base::StringPiece mime_type, |
99 metrics::MetricsLogUploader::MetricServiceType service_type, | 99 metrics::MetricsLogUploader::MetricServiceType service_type, |
100 const base::Callback<void(int)>& on_upload_complete) = 0; | 100 const MetricsLogUploader::UploadCallback& on_upload_complete) = 0; |
101 | 101 |
102 // Returns the standard interval between upload attempts. | 102 // Returns the standard interval between upload attempts. |
103 virtual base::TimeDelta GetStandardUploadInterval() = 0; | 103 virtual base::TimeDelta GetStandardUploadInterval() = 0; |
104 | 104 |
105 // 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 |
106 // backups of metrics data. Unused except on Windows. | 106 // backups of metrics data. Unused except on Windows. |
107 virtual base::string16 GetRegistryBackupKey(); | 107 virtual base::string16 GetRegistryBackupKey(); |
108 | 108 |
109 // Called on plugin loading errors. | 109 // Called on plugin loading errors. |
110 virtual void OnPluginLoadingError(const base::FilePath& plugin_path) {} | 110 virtual void OnPluginLoadingError(const base::FilePath& plugin_path) {} |
(...skipping 25 matching lines...) Expand all Loading... |
136 | 136 |
137 private: | 137 private: |
138 base::Closure update_running_services_; | 138 base::Closure update_running_services_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(MetricsServiceClient); | 140 DISALLOW_COPY_AND_ASSIGN(MetricsServiceClient); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace metrics | 143 } // namespace metrics |
144 | 144 |
145 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 145 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |