OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 tracked_object->set_exec_count(death_data.count); | 235 tracked_object->set_exec_count(death_data.count); |
236 tracked_object->set_exec_time_total(death_data.run_duration_sum); | 236 tracked_object->set_exec_time_total(death_data.run_duration_sum); |
237 tracked_object->set_exec_time_sampled(death_data.run_duration_sample); | 237 tracked_object->set_exec_time_sampled(death_data.run_duration_sample); |
238 tracked_object->set_queue_time_total(death_data.queue_duration_sum); | 238 tracked_object->set_queue_time_total(death_data.queue_duration_sum); |
239 tracked_object->set_queue_time_sampled(death_data.queue_duration_sample); | 239 tracked_object->set_queue_time_sampled(death_data.queue_duration_sample); |
240 tracked_object->set_process_type(AsProtobufProcessType(process_type)); | 240 tracked_object->set_process_type(AsProtobufProcessType(process_type)); |
241 tracked_object->set_process_id(profiler_data.process_id); | 241 tracked_object->set_process_id(profiler_data.process_id); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
| 245 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
245 void ProductDataToProto(const GoogleUpdateSettings::ProductData& product_data, | 246 void ProductDataToProto(const GoogleUpdateSettings::ProductData& product_data, |
246 ProductInfo* product_info) { | 247 ProductInfo* product_info) { |
247 product_info->set_version(product_data.version); | 248 product_info->set_version(product_data.version); |
248 product_info->set_last_update_success_timestamp( | 249 product_info->set_last_update_success_timestamp( |
249 product_data.last_success.ToTimeT()); | 250 product_data.last_success.ToTimeT()); |
250 product_info->set_last_error(product_data.last_error_code); | 251 product_info->set_last_error(product_data.last_error_code); |
251 product_info->set_last_extra_error(product_data.last_extra_code); | 252 product_info->set_last_extra_error(product_data.last_extra_code); |
252 if (ProductInfo::InstallResult_IsValid(product_data.last_result)) { | 253 if (ProductInfo::InstallResult_IsValid(product_data.last_result)) { |
253 product_info->set_last_result( | 254 product_info->set_last_result( |
254 static_cast<ProductInfo::InstallResult>(product_data.last_result)); | 255 static_cast<ProductInfo::InstallResult>(product_data.last_result)); |
255 } | 256 } |
256 } | 257 } |
| 258 #endif |
257 | 259 |
258 } // namespace | 260 } // namespace |
259 | 261 |
260 GoogleUpdateMetrics::GoogleUpdateMetrics() : is_system_install(false) {} | 262 GoogleUpdateMetrics::GoogleUpdateMetrics() : is_system_install(false) {} |
261 | 263 |
262 GoogleUpdateMetrics::~GoogleUpdateMetrics() {} | 264 GoogleUpdateMetrics::~GoogleUpdateMetrics() {} |
263 | 265 |
264 static base::LazyInstance<std::string>::Leaky | 266 static base::LazyInstance<std::string>::Leaky |
265 g_version_extension = LAZY_INSTANCE_INITIALIZER; | 267 g_version_extension = LAZY_INSTANCE_INITIALIZER; |
266 | 268 |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 ProductDataToProto(google_update_metrics.google_update_data, | 1009 ProductDataToProto(google_update_metrics.google_update_data, |
1008 google_update->mutable_google_update_status()); | 1010 google_update->mutable_google_update_status()); |
1009 } | 1011 } |
1010 | 1012 |
1011 if (!google_update_metrics.product_data.version.empty()) { | 1013 if (!google_update_metrics.product_data.version.empty()) { |
1012 ProductDataToProto(google_update_metrics.product_data, | 1014 ProductDataToProto(google_update_metrics.product_data, |
1013 google_update->mutable_client_status()); | 1015 google_update->mutable_client_status()); |
1014 } | 1016 } |
1015 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1017 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
1016 } | 1018 } |
OLD | NEW |