| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.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/proto/system_profile.pb.h" | 16 #include "components/metrics/proto/system_profile.pb.h" |
| 17 | 17 |
| 18 namespace base { |
| 19 class FilePath; |
| 20 } |
| 21 |
| 18 namespace metrics { | 22 namespace metrics { |
| 19 | 23 |
| 20 class MetricsLogUploader; | 24 class MetricsLogUploader; |
| 21 | 25 |
| 22 // An abstraction of operations that depend on the embedder's (e.g. Chrome) | 26 // An abstraction of operations that depend on the embedder's (e.g. Chrome) |
| 23 // environment. | 27 // environment. |
| 24 class MetricsServiceClient { | 28 class MetricsServiceClient { |
| 25 public: | 29 public: |
| 26 virtual ~MetricsServiceClient() {} | 30 virtual ~MetricsServiceClient() {} |
| 27 | 31 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // MetricsLogUploader for details). | 76 // MetricsLogUploader for details). |
| 73 virtual scoped_ptr<MetricsLogUploader> CreateUploader( | 77 virtual scoped_ptr<MetricsLogUploader> CreateUploader( |
| 74 const base::Callback<void(int)>& on_upload_complete) = 0; | 78 const base::Callback<void(int)>& on_upload_complete) = 0; |
| 75 | 79 |
| 76 // Returns the standard interval between upload attempts. | 80 // Returns the standard interval between upload attempts. |
| 77 virtual base::TimeDelta GetStandardUploadInterval() = 0; | 81 virtual base::TimeDelta GetStandardUploadInterval() = 0; |
| 78 | 82 |
| 79 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store | 83 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store |
| 80 // backups of metrics data. Unused except on Windows. | 84 // backups of metrics data. Unused except on Windows. |
| 81 virtual base::string16 GetRegistryBackupKey(); | 85 virtual base::string16 GetRegistryBackupKey(); |
| 86 |
| 87 // Called on plugin loading errors. |
| 88 virtual void OnPluginLoadingError(const base::FilePath& plugin_path) {} |
| 82 }; | 89 }; |
| 83 | 90 |
| 84 } // namespace metrics | 91 } // namespace metrics |
| 85 | 92 |
| 86 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 93 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |