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

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

Issue 7360001: Allow one-time randomization in field trials to work even if metrics are disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 10 #pragma once
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // StartRecordingOnly starts the metrics recording but not reporting, for use 83 // StartRecordingOnly starts the metrics recording but not reporting, for use
84 // in tests only. 84 // in tests only.
85 void Start(); 85 void Start();
86 void StartRecordingOnly(); 86 void StartRecordingOnly();
87 void Stop(); 87 void Stop();
88 88
89 // Returns the client ID for this client, or the empty string if metrics 89 // Returns the client ID for this client, or the empty string if metrics
90 // recording is not currently running. 90 // recording is not currently running.
91 std::string GetClientId(); 91 std::string GetClientId();
92 92
93 // Returns the client ID for this client. It will be non-empty, even if
94 // metrics recording is not currently running.
95 std::string GetClientIdNonEmpty();
96
93 // At startup, prefs needs to be called with a list of all the pref names and 97 // At startup, prefs needs to be called with a list of all the pref names and
94 // types we'll be using. 98 // types we'll be using.
95 static void RegisterPrefs(PrefService* local_state); 99 static void RegisterPrefs(PrefService* local_state);
96 100
97 // Set up notifications which indicate that a user is performing work. This is 101 // Set up notifications which indicate that a user is performing work. This is
98 // useful to allow some features to sleep, until the machine becomes active, 102 // useful to allow some features to sleep, until the machine becomes active,
99 // such as precluding UMA uploads unless there was recent activity. 103 // such as precluding UMA uploads unless there was recent activity.
100 static void SetUpNotifications(NotificationRegistrar* registrar, 104 static void SetUpNotifications(NotificationRegistrar* registrar,
101 NotificationObserver* observer); 105 NotificationObserver* observer);
102 106
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); 435 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList);
432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); 436 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList);
433 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); 437 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
434 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); 438 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
435 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); 439 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
436 440
437 DISALLOW_COPY_AND_ASSIGN(MetricsService); 441 DISALLOW_COPY_AND_ASSIGN(MetricsService);
438 }; 442 };
439 443
440 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 444 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698