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

Side by Side Diff: metrics_library.h

Issue 6211001: metrics: Send ability to notify chrome of system crashes (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/metrics.git@master
Patch Set: respond to review 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
« no previous file with comments | « c_metrics_library.cc ('k') | metrics_library.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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 #ifndef METRICS_LIBRARY_H_ 5 #ifndef METRICS_LIBRARY_H_
6 #define METRICS_LIBRARY_H_ 6 #define METRICS_LIBRARY_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // non-blocking RPC to UserMetrics::RecordAction. The new metric must be 75 // non-blocking RPC to UserMetrics::RecordAction. The new metric must be
76 // added to chrome/tools/extract_actions.py in the Chromium repository, which 76 // added to chrome/tools/extract_actions.py in the Chromium repository, which
77 // should then be run to generate a hash for the new action. 77 // should then be run to generate a hash for the new action.
78 // 78 //
79 // Until http://crosbug.com/11125 is fixed, the metric must also be added to 79 // Until http://crosbug.com/11125 is fixed, the metric must also be added to
80 // chrome/browser/chromeos/external_metrics.cc. 80 // chrome/browser/chromeos/external_metrics.cc.
81 // 81 //
82 // |action| is the user-generated event (e.g., "MuteKeyPressed"). 82 // |action| is the user-generated event (e.g., "MuteKeyPressed").
83 bool SendUserActionToUMA(const std::string& action); 83 bool SendUserActionToUMA(const std::string& action);
84 84
85 // Sends a signal to UMA that a crash of the given |crash_kind|
86 // has occurred. Used by UMA to generate stability statistics.
87 bool SendCrashToUMA(const char *crash_kind);
88
85 // Sends to Autotest and returns true on success. 89 // Sends to Autotest and returns true on success.
86 static bool SendToAutotest(const std::string& name, int value); 90 static bool SendToAutotest(const std::string& name, int value);
87 91
88 private: 92 private:
89 friend class CMetricsLibraryTest; 93 friend class CMetricsLibraryTest;
90 friend class MetricsLibraryTest; 94 friend class MetricsLibraryTest;
91 FRIEND_TEST(MetricsLibraryTest, AreMetricsEnabled); 95 FRIEND_TEST(MetricsLibraryTest, AreMetricsEnabled);
92 FRIEND_TEST(MetricsLibraryTest, FormatChromeMessage); 96 FRIEND_TEST(MetricsLibraryTest, FormatChromeMessage);
93 FRIEND_TEST(MetricsLibraryTest, FormatChromeMessageTooLong); 97 FRIEND_TEST(MetricsLibraryTest, FormatChromeMessageTooLong);
94 FRIEND_TEST(MetricsLibraryTest, IsDeviceMounted); 98 FRIEND_TEST(MetricsLibraryTest, IsDeviceMounted);
(...skipping 27 matching lines...) Expand all
122 static time_t cached_enabled_time_; 126 static time_t cached_enabled_time_;
123 127
124 // Cached state of whether or not metrics were enabled. 128 // Cached state of whether or not metrics were enabled.
125 static bool cached_enabled_; 129 static bool cached_enabled_;
126 130
127 const char* uma_events_file_; 131 const char* uma_events_file_;
128 const char* consent_file_; 132 const char* consent_file_;
129 }; 133 };
130 134
131 #endif // METRICS_LIBRARY_H_ 135 #endif // METRICS_LIBRARY_H_
OLDNEW
« no previous file with comments | « c_metrics_library.cc ('k') | metrics_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698