| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/cpu.h" |
| 13 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/perftimer.h" | 16 #include "base/perftimer.h" |
| 16 #include "base/prefs/pref_registry_simple.h" | 17 #include "base/prefs/pref_registry_simple.h" |
| 17 #include "base/prefs/pref_service.h" | 18 #include "base/prefs/pref_service.h" |
| 18 #include "base/profiler/alternate_timer.h" | 19 #include "base/profiler/alternate_timer.h" |
| 19 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 22 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 if (base::win::IsMetroProcess()) | 833 if (base::win::IsMetroProcess()) |
| 833 os_name += " (Metro)"; | 834 os_name += " (Metro)"; |
| 834 #endif | 835 #endif |
| 835 os->set_name(os_name); | 836 os->set_name(os_name); |
| 836 os->set_version(base::SysInfo::OperatingSystemVersion()); | 837 os->set_version(base::SysInfo::OperatingSystemVersion()); |
| 837 #if defined(OS_ANDROID) | 838 #if defined(OS_ANDROID) |
| 838 os->set_fingerprint( | 839 os->set_fingerprint( |
| 839 base::android::BuildInfo::GetInstance()->android_build_fp()); | 840 base::android::BuildInfo::GetInstance()->android_build_fp()); |
| 840 #endif | 841 #endif |
| 841 | 842 |
| 843 base::CPU cpu_info; |
| 844 SystemProfileProto::Hardware::CPU* cpu = hardware->mutable_cpu(); |
| 845 cpu->set_vendor_name(cpu_info.vendor_name()); |
| 846 cpu->set_stepping(cpu_info.stepping()); |
| 847 cpu->set_model(cpu_info.model()); |
| 848 cpu->set_family(cpu_info.family()); |
| 849 cpu->set_type(cpu_info.type()); |
| 850 cpu->set_extended_model(cpu_info.extended_model()); |
| 851 cpu->set_extended_family(cpu_info.extended_family()); |
| 852 |
| 842 const gpu::GPUInfo& gpu_info = | 853 const gpu::GPUInfo& gpu_info = |
| 843 GpuDataManager::GetInstance()->GetGPUInfo(); | 854 GpuDataManager::GetInstance()->GetGPUInfo(); |
| 844 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); | 855 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); |
| 845 gpu->set_vendor_id(gpu_info.gpu.vendor_id); | 856 gpu->set_vendor_id(gpu_info.gpu.vendor_id); |
| 846 gpu->set_device_id(gpu_info.gpu.device_id); | 857 gpu->set_device_id(gpu_info.gpu.device_id); |
| 847 gpu->set_driver_version(gpu_info.driver_version); | 858 gpu->set_driver_version(gpu_info.driver_version); |
| 848 gpu->set_driver_date(gpu_info.driver_date); | 859 gpu->set_driver_date(gpu_info.driver_date); |
| 849 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* | 860 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* |
| 850 gpu_performance = gpu->mutable_performance_statistics(); | 861 gpu_performance = gpu->mutable_performance_statistics(); |
| 851 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); | 862 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 | 1098 |
| 1088 paired_device->set_vendor_prefix(vendor_prefix); | 1099 paired_device->set_vendor_prefix(vendor_prefix); |
| 1089 } | 1100 } |
| 1090 | 1101 |
| 1091 paired_device->set_vendor_id(device->GetVendorID()); | 1102 paired_device->set_vendor_id(device->GetVendorID()); |
| 1092 paired_device->set_product_id(device->GetProductID()); | 1103 paired_device->set_product_id(device->GetProductID()); |
| 1093 paired_device->set_device_id(device->GetDeviceID()); | 1104 paired_device->set_device_id(device->GetDeviceID()); |
| 1094 } | 1105 } |
| 1095 #endif // defined(OS_CHROMEOS) | 1106 #endif // defined(OS_CHROMEOS) |
| 1096 } | 1107 } |
| OLD | NEW |