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

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

Issue 6077013: Add support for collecting non-Chrome crash stats in Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Saves in the preferences if the browser is running under a debugger. 119 // Saves in the preferences if the browser is running under a debugger.
120 // This count is eventually send via UMA logs. 120 // This count is eventually send via UMA logs.
121 void RecordBreakpadHasDebugger(bool has_debugger); 121 void RecordBreakpadHasDebugger(bool has_debugger);
122 122
123 // Save any unsent logs into a persistent store in a pref. We always do this 123 // Save any unsent logs into a persistent store in a pref. We always do this
124 // at shutdown, but we can do it as we reduce the list as well. 124 // at shutdown, but we can do it as we reduce the list as well.
125 void StoreUnsentLogs(); 125 void StoreUnsentLogs();
126 126
127 #if defined(OS_CHROMEOS) 127 #if defined(OS_CHROMEOS)
128 // Returns the hardware class of the Chrome OS device (e.g.,
129 // hardware qualification ID), or "unknown" if the hardware class is
130 // not available. The hardware class identifies the configured
131 // system components such us CPU, WiFi adapter, etc. Note that this
132 // routine invokes an external utility to determine the hardware
133 // class.
134 static std::string GetHardwareClass();
135
136 // Start the external metrics service, which collects metrics from Chrome OS 128 // Start the external metrics service, which collects metrics from Chrome OS
137 // and passes them to UMA. 129 // and passes them to UMA.
138 void StartExternalMetrics(); 130 void StartExternalMetrics();
131
132 // Records a Chrome OS crash.
133 void LogChromeOSCrash(const std::string &crash_type);
139 #endif 134 #endif
140 135
141 bool recording_active() const; 136 bool recording_active() const;
142 bool reporting_active() const; 137 bool reporting_active() const;
143 138
144 private: 139 private:
145 // The MetricsService has a lifecycle that is stored as a state. 140 // The MetricsService has a lifecycle that is stored as a state.
146 // See metrics_service.cc for description of this lifecycle. 141 // See metrics_service.cc for description of this lifecycle.
147 enum State { 142 enum State {
148 INITIALIZED, // Constructor was called. 143 INITIALIZED, // Constructor was called.
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); 492 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList);
498 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); 493 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList);
499 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); 494 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
500 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); 495 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
501 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); 496 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
502 497
503 DISALLOW_COPY_AND_ASSIGN(MetricsService); 498 DISALLOW_COPY_AND_ASSIGN(MetricsService);
504 }; 499 };
505 500
506 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 501 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698