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

Side by Side Diff: src/platform/metrics/metrics_client.cc

Issue 2037011: Remove the deprecated static metrics APIs. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 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
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 #include <cstdio> 5 #include <cstdio>
6 #include <cstdlib> 6 #include <cstdlib>
7 7
8 #include "metrics_library.h" 8 #include "metrics_library.h"
9 9
10 int main(int argc, char** argv) { 10 int main(int argc, char** argv) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } else { 71 } else {
72 sample = atoi(argv[name_index + 1]); 72 sample = atoi(argv[name_index + 1]);
73 } 73 }
74 74
75 // Send metrics 75 // Send metrics
76 if (send_to_autotest) { 76 if (send_to_autotest) {
77 MetricsLibrary::SendToAutotest(name, sample); 77 MetricsLibrary::SendToAutotest(name, sample);
78 } 78 }
79 79
80 if (send_to_chrome) { 80 if (send_to_chrome) {
81 MetricsLibrary metrics_lib;
82 metrics_lib.Init();
81 if (send_enum) { 83 if (send_enum) {
82 int max = atoi(argv[name_index + 2]); 84 int max = atoi(argv[name_index + 2]);
83 MetricsLibrary::SendEnumToChrome(name, sample, max); 85 metrics_lib.SendEnumToUMA(name, sample, max);
84 } else { 86 } else {
85 int min = atoi(argv[name_index + 2]); 87 int min = atoi(argv[name_index + 2]);
86 int max = atoi(argv[name_index + 3]); 88 int max = atoi(argv[name_index + 3]);
87 int nbuckets = atoi(argv[name_index + 4]); 89 int nbuckets = atoi(argv[name_index + 4]);
88 MetricsLibrary::SendToChrome(name, sample, min, max, nbuckets); 90 metrics_lib.SendToUMA(name, sample, min, max, nbuckets);
89 } 91 }
90 } 92 }
91 return 0; 93 return 0;
92 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698