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

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

Issue 6883102: Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years, 7 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
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('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 (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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 virtual ~MetricsService(); 75 virtual ~MetricsService();
76 76
77 // Start/stop the metrics recording and uploading machine. These should be 77 // Start/stop the metrics recording and uploading machine. These should be
78 // used on startup and when the user clicks the checkbox in the prefs. 78 // used on startup and when the user clicks the checkbox in the prefs.
79 // StartRecordingOnly starts the metrics recording but not reporting, for use 79 // StartRecordingOnly starts the metrics recording but not reporting, for use
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
86 // recording is not currently running.
87 std::string GetClientId();
88
85 // At startup, prefs needs to be called with a list of all the pref names and 89 // At startup, prefs needs to be called with a list of all the pref names and
86 // types we'll be using. 90 // types we'll be using.
87 static void RegisterPrefs(PrefService* local_state); 91 static void RegisterPrefs(PrefService* local_state);
88 92
89 // Set up notifications which indicate that a user is performing work. This is 93 // Set up notifications which indicate that a user is performing work. This is
90 // useful to allow some features to sleep, until the machine becomes active, 94 // useful to allow some features to sleep, until the machine becomes active,
91 // such as precluding UMA uploads unless there was recent activity. 95 // such as precluding UMA uploads unless there was recent activity.
92 static void SetUpNotifications(NotificationRegistrar* registrar, 96 static void SetUpNotifications(NotificationRegistrar* registrar,
93 NotificationObserver* observer); 97 NotificationObserver* observer);
94 98
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); 419 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList);
416 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); 420 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList);
417 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); 421 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
418 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); 422 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
419 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); 423 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
420 424
421 DISALLOW_COPY_AND_ASSIGN(MetricsService); 425 DISALLOW_COPY_AND_ASSIGN(MetricsService);
422 }; 426 };
423 427
424 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 428 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698