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

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

Issue 465131: Changes to include metrics collection package in system and no-op script customizable by overlay (Closed)
Patch Set: Created 11 years 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) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 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 "platform/metrics_collection/metrics_client.h" 5 #include "platform/metrics_collection/metrics_client.h"
6 #include <errno.h> 6 #include <errno.h>
7 #include <sys/file.h> 7 #include <sys/file.h>
8 #include <string.h> 8 #include <string.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <cstdlib>
10 #include <iostream> 11 #include <iostream>
11 #include "platform/metrics_collection/metrics_library.h" 12 #include "platform/metrics_collection/metrics_library.h"
12 13
13 using namespace std; 14 using namespace std;
14 15
15 void MetricsClient::ParseFile(FILE *input) { 16 void MetricsClient::ParseFile(FILE *input) {
16 // Open both Chrome and autotest files 17 // Open both Chrome and autotest files
17 bool autotest_file_opened = true; 18 bool autotest_file_opened = true;
18 bool chrome_file_opened = true; 19 bool chrome_file_opened = true;
19 FILE *autotest_file = fopen(kAutotestPath, "a+"); 20 FILE *autotest_file = fopen(kAutotestPath, "a+");
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 MetricsLibrary::SendToAutotest(argv[metric_name_index], 137 MetricsLibrary::SendToAutotest(argv[metric_name_index],
137 argv[metric_value_index], NULL); 138 argv[metric_value_index], NULL);
138 } 139 }
139 if (send_to_chrome) { 140 if (send_to_chrome) {
140 MetricsLibrary::SendToChrome(argv[metric_name_index], 141 MetricsLibrary::SendToChrome(argv[metric_name_index],
141 argv[metric_value_index], -1); 142 argv[metric_value_index], -1);
142 } 143 }
143 } 144 }
144 return 0; 145 return 0;
145 } 146 }
OLDNEW
« no previous file with comments | « src/platform/metrics_collection/debian/rules ('k') | src/platform/metrics_collection/omaha_tracker.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698