| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 if (base::win::IsMetroProcess()) | 726 if (base::win::IsMetroProcess()) |
| 726 os_name += " (Metro)"; | 727 os_name += " (Metro)"; |
| 727 #endif | 728 #endif |
| 728 os->set_name(os_name); | 729 os->set_name(os_name); |
| 729 os->set_version(base::SysInfo::OperatingSystemVersion()); | 730 os->set_version(base::SysInfo::OperatingSystemVersion()); |
| 730 #if defined(OS_ANDROID) | 731 #if defined(OS_ANDROID) |
| 731 os->set_fingerprint( | 732 os->set_fingerprint( |
| 732 base::android::BuildInfo::GetInstance()->android_build_fp()); | 733 base::android::BuildInfo::GetInstance()->android_build_fp()); |
| 733 #endif | 734 #endif |
| 734 | 735 |
| 736 base::CPU cpu_info; |
| 737 SystemProfileProto::Hardware::CPU* cpu = hardware->mutable_cpu(); |
| 738 cpu->set_vendor_name(cpu_info.vendor_name()); |
| 739 cpu->set_signature(cpu_info.signature()); |
| 740 |
| 735 const gpu::GPUInfo& gpu_info = | 741 const gpu::GPUInfo& gpu_info = |
| 736 GpuDataManager::GetInstance()->GetGPUInfo(); | 742 GpuDataManager::GetInstance()->GetGPUInfo(); |
| 737 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); | 743 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); |
| 738 gpu->set_vendor_id(gpu_info.gpu.vendor_id); | 744 gpu->set_vendor_id(gpu_info.gpu.vendor_id); |
| 739 gpu->set_device_id(gpu_info.gpu.device_id); | 745 gpu->set_device_id(gpu_info.gpu.device_id); |
| 740 gpu->set_driver_version(gpu_info.driver_version); | 746 gpu->set_driver_version(gpu_info.driver_version); |
| 741 gpu->set_driver_date(gpu_info.driver_date); | 747 gpu->set_driver_date(gpu_info.driver_date); |
| 742 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* | 748 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* |
| 743 gpu_performance = gpu->mutable_performance_statistics(); | 749 gpu_performance = gpu->mutable_performance_statistics(); |
| 744 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); | 750 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 | 928 |
| 923 paired_device->set_vendor_prefix(vendor_prefix); | 929 paired_device->set_vendor_prefix(vendor_prefix); |
| 924 } | 930 } |
| 925 | 931 |
| 926 paired_device->set_vendor_id(device->GetVendorID()); | 932 paired_device->set_vendor_id(device->GetVendorID()); |
| 927 paired_device->set_product_id(device->GetProductID()); | 933 paired_device->set_product_id(device->GetProductID()); |
| 928 paired_device->set_device_id(device->GetDeviceID()); | 934 paired_device->set_device_id(device->GetDeviceID()); |
| 929 } | 935 } |
| 930 #endif // defined(OS_CHROMEOS) | 936 #endif // defined(OS_CHROMEOS) |
| 931 } | 937 } |
| OLD | NEW |