Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: components/metrics/metrics_service_client.h

Issue 979363003: UMA: use a more frequent upload interval for Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removes conditional Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/test_metrics_service_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/metrics/proto/system_profile.pb.h" 16 #include "components/metrics/proto/system_profile.pb.h"
16 17
17 namespace metrics { 18 namespace metrics {
18 19
19 class MetricsLogUploader; 20 class MetricsLogUploader;
20 21
21 // An abstraction of operations that depend on the embedder's (e.g. Chrome) 22 // An abstraction of operations that depend on the embedder's (e.g. Chrome)
22 // environment. 23 // environment.
23 class MetricsServiceClient { 24 class MetricsServiceClient {
24 public: 25 public:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Called prior to a metrics log being closed, allowing the client to collect 60 // 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 61 // extra histograms that will go in that log. Asynchronous API - the client
61 // implementation should call |done_callback| when complete. 62 // implementation should call |done_callback| when complete.
62 virtual void CollectFinalMetrics(const base::Closure& done_callback) = 0; 63 virtual void CollectFinalMetrics(const base::Closure& done_callback) = 0;
63 64
64 // Creates a MetricsLogUploader with the specified parameters (see comments on 65 // Creates a MetricsLogUploader with the specified parameters (see comments on
65 // MetricsLogUploader for details). 66 // MetricsLogUploader for details).
66 virtual scoped_ptr<MetricsLogUploader> CreateUploader( 67 virtual scoped_ptr<MetricsLogUploader> CreateUploader(
67 const base::Callback<void(int)>& on_upload_complete) = 0; 68 const base::Callback<void(int)>& on_upload_complete) = 0;
68 69
70 // Returns the standard interval between upload attempts.
71 virtual base::TimeDelta GetStandardUploadInterval() = 0;
72
69 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store 73 // Returns the name of a key under HKEY_CURRENT_USER that can be used to store
70 // backups of metrics data. Unused except on Windows. 74 // backups of metrics data. Unused except on Windows.
71 virtual base::string16 GetRegistryBackupKey(); 75 virtual base::string16 GetRegistryBackupKey();
72 }; 76 };
73 77
74 } // namespace metrics 78 } // namespace metrics
75 79
76 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ 80 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/test_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698