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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual void StartGatheringMetrics(const base::Closure& done_callback) = 0; | 57 virtual void StartGatheringMetrics(const base::Closure& done_callback) = 0; |
58 | 58 |
59 // Called prior to a metrics log being closed, allowing the client to collect | 59 // Called prior to a metrics log being closed, allowing the client to collect |
60 // extra histograms that will go in that log. Asynchronous API - the client | 60 // extra histograms that will go in that log. Asynchronous API - the client |
61 // implementation should call |done_callback| when complete. | 61 // implementation should call |done_callback| when complete. |
62 virtual void CollectFinalMetrics(const base::Closure& done_callback) = 0; | 62 virtual void CollectFinalMetrics(const base::Closure& done_callback) = 0; |
63 | 63 |
64 // Creates a MetricsLogUploader with the specified parameters (see comments on | 64 // Creates a MetricsLogUploader with the specified parameters (see comments on |
65 // MetricsLogUploader for details). | 65 // MetricsLogUploader for details). |
66 virtual scoped_ptr<MetricsLogUploader> CreateUploader( | 66 virtual scoped_ptr<MetricsLogUploader> CreateUploader( |
67 const std::string& server_url, | |
68 const std::string& mime_type, | |
69 const base::Callback<void(int)>& on_upload_complete) = 0; | 67 const base::Callback<void(int)>& on_upload_complete) = 0; |
70 | 68 |
71 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store | 69 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store |
72 // backups of metrics data. Unused except on Windows. | 70 // backups of metrics data. Unused except on Windows. |
73 virtual base::string16 GetRegistryBackupKey(); | 71 virtual base::string16 GetRegistryBackupKey(); |
74 }; | 72 }; |
75 | 73 |
76 } // namespace metrics | 74 } // namespace metrics |
77 | 75 |
78 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 76 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |