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

Side by Side Diff: src/platform/metrics/metrics_library.h

Issue 1649007: metrics cleanup and fixes. (Closed)
Patch Set: Expose the pass/fail status. Created 10 years, 8 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
« no previous file with comments | « src/platform/metrics/metrics_daemon.cc ('k') | src/platform/metrics/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 /* 5 /*
6 * metrics_library.h 6 * metrics_library.h
7 * 7 *
8 * Created on: Dec 1, 2009 8 * Created on: Dec 1, 2009
9 * Author: sosa 9 * Author: sosa
10 */ 10 */
11 11
12 #ifndef METRICS_LIBRARY_H_ 12 #ifndef METRICS_LIBRARY_H_
13 #define METRICS_LIBRARY_H_ 13 #define METRICS_LIBRARY_H_
14 14
15 #include <stdio.h>
16 #include <string> 15 #include <string>
17 16
18 // TODO(sosa@chromium.org): Add testing for send methods 17 // TODO(sosa@chromium.org): Add testing for send methods
19 18
20 // Library used to send metrics both Autotest and Chrome 19 // Library used to send metrics both Autotest and Chrome
21 class MetricsLibrary { 20 class MetricsLibrary {
22 public: 21 public:
23 // Sends histogram data to Chrome. 22 // Sends histogram data to Chrome and returns true on success.
24 static void SendToChrome(std::string name, std::string value); 23 static bool SendToChrome(std::string name, int value);
25 // Sends to Autotest. 24 // Sends to Autotest and returns true on success.
26 static void SendToAutotest(std::string name, std::string value); 25 static bool SendToAutotest(std::string name, int value);
27
28 private:
29 // Prints message to stderr
30 static void PrintError(const char *message, const char *file, int code);
31 }; 26 };
32 27
33 #endif /* METRICS_LIBRARY_H_ */ 28 #endif /* METRICS_LIBRARY_H_ */
OLDNEW
« no previous file with comments | « src/platform/metrics/metrics_daemon.cc ('k') | src/platform/metrics/metrics_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698