| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // calling |done_callback| when complete. | 75 // calling |done_callback| when complete. |
| 76 virtual void InitializeSystemProfileMetrics( | 76 virtual void InitializeSystemProfileMetrics( |
| 77 const base::Closure& done_callback) = 0; | 77 const base::Closure& done_callback) = 0; |
| 78 | 78 |
| 79 // Called prior to a metrics log being closed, allowing the client to collect | 79 // Called prior to a metrics log being closed, allowing the client to collect |
| 80 // extra histograms that will go in that log. Asynchronous API - the client | 80 // extra histograms that will go in that log. Asynchronous API - the client |
| 81 // implementation should call |done_callback| when complete. | 81 // implementation should call |done_callback| when complete. |
| 82 virtual void CollectFinalMetricsForLog( | 82 virtual void CollectFinalMetricsForLog( |
| 83 const base::Closure& done_callback) = 0; | 83 const base::Closure& done_callback) = 0; |
| 84 | 84 |
| 85 // Get the URL of the metrics server. |
| 86 virtual std::string GetMetricsServerUrl(); |
| 87 |
| 85 // Creates a MetricsLogUploader with the specified parameters (see comments on | 88 // Creates a MetricsLogUploader with the specified parameters (see comments on |
| 86 // MetricsLogUploader for details). | 89 // MetricsLogUploader for details). |
| 87 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( | 90 virtual std::unique_ptr<MetricsLogUploader> CreateUploader( |
| 91 const std::string& server_url, |
| 92 const std::string& mime_type, |
| 88 const base::Callback<void(int)>& on_upload_complete) = 0; | 93 const base::Callback<void(int)>& on_upload_complete) = 0; |
| 89 | 94 |
| 90 // Returns the standard interval between upload attempts. | 95 // Returns the standard interval between upload attempts. |
| 91 virtual base::TimeDelta GetStandardUploadInterval() = 0; | 96 virtual base::TimeDelta GetStandardUploadInterval() = 0; |
| 92 | 97 |
| 93 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store | 98 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store |
| 94 // backups of metrics data. Unused except on Windows. | 99 // backups of metrics data. Unused except on Windows. |
| 95 virtual base::string16 GetRegistryBackupKey(); | 100 virtual base::string16 GetRegistryBackupKey(); |
| 96 | 101 |
| 97 // Called on plugin loading errors. | 102 // Called on plugin loading errors. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 109 // shown during first-run. | 114 // shown during first-run. |
| 110 virtual EnableMetricsDefault GetMetricsReportingDefaultState(); | 115 virtual EnableMetricsDefault GetMetricsReportingDefaultState(); |
| 111 | 116 |
| 112 // Returns whether cellular logic is enabled for metrics reporting. | 117 // Returns whether cellular logic is enabled for metrics reporting. |
| 113 virtual bool IsUMACellularUploadLogicEnabled(); | 118 virtual bool IsUMACellularUploadLogicEnabled(); |
| 114 }; | 119 }; |
| 115 | 120 |
| 116 } // namespace metrics | 121 } // namespace metrics |
| 117 | 122 |
| 118 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 123 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |