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

Side by Side Diff: chrome/browser/metrics/metrics_service.h

Issue 10830241: Inform GetEntropySource of whether or not metrics reporting will be enabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698