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 27 matching lines...) Expand all Loading... |
38 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
39 #include "chrome/installer/util/google_update_settings.h" | 39 #include "chrome/installer/util/google_update_settings.h" |
40 #include "content/public/browser/content_browser_client.h" | 40 #include "content/public/browser/content_browser_client.h" |
41 #include "content/public/browser/gpu_data_manager.h" | 41 #include "content/public/browser/gpu_data_manager.h" |
42 #include "content/public/common/content_client.h" | 42 #include "content/public/common/content_client.h" |
43 #include "content/public/common/gpu_info.h" | 43 #include "content/public/common/gpu_info.h" |
44 #include "googleurl/src/gurl.h" | 44 #include "googleurl/src/gurl.h" |
45 #include "ui/gfx/screen.h" | 45 #include "ui/gfx/screen.h" |
46 #include "webkit/plugins/webplugininfo.h" | 46 #include "webkit/plugins/webplugininfo.h" |
47 | 47 |
| 48 #if defined(OS_ANDROID) |
| 49 #include "base/android/build_info.h" |
| 50 #endif |
| 51 |
48 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) | 52 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) |
49 | 53 |
50 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
51 #include "base/win/metro.h" | 55 #include "base/win/metro.h" |
52 | 56 |
53 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx | 57 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx |
54 extern "C" IMAGE_DOS_HEADER __ImageBase; | 58 extern "C" IMAGE_DOS_HEADER __ImageBase; |
55 #endif | 59 #endif |
56 | 60 |
57 using content::GpuDataManager; | 61 using content::GpuDataManager; |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 // TODO(mad): This only checks whether the main process is a Metro process at | 775 // TODO(mad): This only checks whether the main process is a Metro process at |
772 // upload time; not whether the collected metrics were all gathered from | 776 // upload time; not whether the collected metrics were all gathered from |
773 // Metro. This is ok as an approximation for now, since users will rarely be | 777 // Metro. This is ok as an approximation for now, since users will rarely be |
774 // switching from Metro to Desktop mode; but we should re-evaluate whether we | 778 // switching from Metro to Desktop mode; but we should re-evaluate whether we |
775 // can distinguish metrics more cleanly in the future: http://crbug.com/140568 | 779 // can distinguish metrics more cleanly in the future: http://crbug.com/140568 |
776 if (base::win::IsMetroProcess()) | 780 if (base::win::IsMetroProcess()) |
777 os_name += " (Metro)"; | 781 os_name += " (Metro)"; |
778 #endif | 782 #endif |
779 os->set_name(os_name); | 783 os->set_name(os_name); |
780 os->set_version(base::SysInfo::OperatingSystemVersion()); | 784 os->set_version(base::SysInfo::OperatingSystemVersion()); |
| 785 #if defined(OS_ANDROID) |
| 786 os->set_fingerprint( |
| 787 base::android::BuildInfo::GetInstance()->android_build_fp()); |
| 788 #endif |
781 | 789 |
782 const content::GPUInfo& gpu_info = | 790 const content::GPUInfo& gpu_info = |
783 GpuDataManager::GetInstance()->GetGPUInfo(); | 791 GpuDataManager::GetInstance()->GetGPUInfo(); |
784 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); | 792 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); |
785 gpu->set_vendor_id(gpu_info.gpu.vendor_id); | 793 gpu->set_vendor_id(gpu_info.gpu.vendor_id); |
786 gpu->set_device_id(gpu_info.gpu.device_id); | 794 gpu->set_device_id(gpu_info.gpu.device_id); |
787 gpu->set_driver_version(gpu_info.driver_version); | 795 gpu->set_driver_version(gpu_info.driver_version); |
788 gpu->set_driver_date(gpu_info.driver_date); | 796 gpu->set_driver_date(gpu_info.driver_date); |
789 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* | 797 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* |
790 gpu_performance = gpu->mutable_performance_statistics(); | 798 gpu_performance = gpu->mutable_performance_statistics(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 ProductDataToProto(google_update_metrics.google_update_data, | 1017 ProductDataToProto(google_update_metrics.google_update_data, |
1010 google_update->mutable_google_update_status()); | 1018 google_update->mutable_google_update_status()); |
1011 } | 1019 } |
1012 | 1020 |
1013 if (!google_update_metrics.product_data.version.empty()) { | 1021 if (!google_update_metrics.product_data.version.empty()) { |
1014 ProductDataToProto(google_update_metrics.product_data, | 1022 ProductDataToProto(google_update_metrics.product_data, |
1015 google_update->mutable_client_status()); | 1023 google_update->mutable_client_status()); |
1016 } | 1024 } |
1017 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1025 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
1018 } | 1026 } |
OLD | NEW |