OLD | NEW |
---|---|
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 void RecordBreakpadRegistration(bool success); | 115 void RecordBreakpadRegistration(bool success); |
116 | 116 |
117 // Saves in the preferences if the browser is running under a debugger. | 117 // Saves in the preferences if the browser is running under a debugger. |
118 // This count is eventually send via UMA logs. | 118 // This count is eventually send via UMA logs. |
119 void RecordBreakpadHasDebugger(bool has_debugger); | 119 void RecordBreakpadHasDebugger(bool has_debugger); |
120 | 120 |
121 // Save any unsent logs into a persistent store in a pref. We always do this | 121 // Save any unsent logs into a persistent store in a pref. We always do this |
122 // at shutdown, but we can do it as we reduce the list as well. | 122 // at shutdown, but we can do it as we reduce the list as well. |
123 void StoreUnsentLogs(); | 123 void StoreUnsentLogs(); |
124 | 124 |
125 // Records that the browser was shut down cleanly. | |
126 void LogCleanShutdown(); | |
jar (doing other things)
2011/06/29 04:00:09
Can you motivate better why we want to expose this
| |
127 | |
125 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
126 // Start the external metrics service, which collects metrics from Chrome OS | 129 // Start the external metrics service, which collects metrics from Chrome OS |
127 // and passes them to UMA. | 130 // and passes them to UMA. |
128 void StartExternalMetrics(); | 131 void StartExternalMetrics(); |
129 | 132 |
130 // Records a Chrome OS crash. | 133 // Records a Chrome OS crash. |
131 void LogChromeOSCrash(const std::string &crash_type); | 134 void LogChromeOSCrash(const std::string &crash_type); |
132 #endif | 135 #endif |
133 | 136 |
134 bool recording_active() const; | 137 bool recording_active() const; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 | 282 |
280 // Records a renderer process crash. | 283 // Records a renderer process crash. |
281 void LogRendererCrash(); | 284 void LogRendererCrash(); |
282 | 285 |
283 // Records an extension renderer process crash. | 286 // Records an extension renderer process crash. |
284 void LogExtensionRendererCrash(); | 287 void LogExtensionRendererCrash(); |
285 | 288 |
286 // Records a renderer process hang. | 289 // Records a renderer process hang. |
287 void LogRendererHang(); | 290 void LogRendererHang(); |
288 | 291 |
289 // Records that the browser was shut down cleanly. | |
290 void LogCleanShutdown(); | |
291 | |
292 // Set the value in preferences for the number of bookmarks and folders | 292 // Set the value in preferences for the number of bookmarks and folders |
293 // in node. The pref key for the number of bookmarks in num_bookmarks_key and | 293 // in node. The pref key for the number of bookmarks in num_bookmarks_key and |
294 // the pref key for number of folders in num_folders_key. | 294 // the pref key for number of folders in num_folders_key. |
295 void LogBookmarks(const BookmarkNode* node, | 295 void LogBookmarks(const BookmarkNode* node, |
296 const char* num_bookmarks_key, | 296 const char* num_bookmarks_key, |
297 const char* num_folders_key); | 297 const char* num_folders_key); |
298 | 298 |
299 // Sets preferences for the number of bookmarks in model. | 299 // Sets preferences for the number of bookmarks in model. |
300 void LogBookmarks(BookmarkModel* model); | 300 void LogBookmarks(BookmarkModel* model); |
301 | 301 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); | 428 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); |
429 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); | 429 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); |
430 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); | 430 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); |
431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); | 431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); |
432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); | 432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); |
433 | 433 |
434 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 434 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
435 }; | 435 }; |
436 | 436 |
437 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 437 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |