OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file defines a service that collects information about the user | 5 // This file defines a service that collects information about the user |
6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
7 | 7 |
8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 // in tests only. | 80 // in tests only. |
81 void Start(); | 81 void Start(); |
82 void StartRecordingOnly(); | 82 void StartRecordingOnly(); |
83 void Stop(); | 83 void Stop(); |
84 | 84 |
85 // Returns the client ID for this client, or the empty string if metrics | 85 // Returns the client ID for this client, or the empty string if metrics |
86 // recording is not currently running. | 86 // recording is not currently running. |
87 std::string GetClientId(); | 87 std::string GetClientId(); |
88 | 88 |
89 // Returns the preferred entropy source used to seed persistent activities | 89 // Returns the preferred entropy source used to seed persistent activities |
90 // based on whether or not metrics reporting is permitted on this client. If | 90 // based on whether or not metrics reporting will permitted on this client. |
91 // it is permitted, this returns the client ID concatenated with the low | 91 // The caller must determine if metrics reorting will be enabled for this |
Ilya Sherman
2012/08/09 16:47:29
nit: "reorting" -> "reporting"
SteveT
2012/08/09 17:18:30
Done.
| |
92 // entropy source. Otherwise, this just returns the low entropy source. | 92 // client and pass that state in as |reporting_will_be_enabled|. If |
93 std::string GetEntropySource(); | 93 // |reporting_will_be_enabled| is true, this method returns the client ID |
94 // concatenated with the low entropy source. Otherwise, this method just | |
95 // returns the low entropy source. | |
96 std::string GetEntropySource(bool reporting_will_be_enabled); | |
94 | 97 |
95 // Force the client ID to be generated. This is useful in case it's needed | 98 // Force the client ID to be generated. This is useful in case it's needed |
96 // before recording. | 99 // before recording. |
97 void ForceClientIdCreation(); | 100 void ForceClientIdCreation(); |
98 | 101 |
99 // At startup, prefs needs to be called with a list of all the pref names and | 102 // At startup, prefs needs to be called with a list of all the pref names and |
100 // types we'll be using. | 103 // types we'll be using. |
101 static void RegisterPrefs(PrefService* local_state); | 104 static void RegisterPrefs(PrefService* local_state); |
102 | 105 |
103 // Set up notifications which indicate that a user is performing work. This is | 106 // Set up notifications which indicate that a user is performing work. This is |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 483 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
481 friend class extensions::ExtensionDownloader; | 484 friend class extensions::ExtensionDownloader; |
482 | 485 |
483 // Returns true if prefs::kMetricsReportingEnabled is set. | 486 // Returns true if prefs::kMetricsReportingEnabled is set. |
484 static bool IsMetricsReportingEnabled(); | 487 static bool IsMetricsReportingEnabled(); |
485 | 488 |
486 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 489 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
487 }; | 490 }; |
488 | 491 |
489 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 492 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |