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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gpu/gpu_feature_checker.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 25 matching lines...) Expand all
36 #include "chrome/common/chrome_version_info.h" 36 #include "chrome/common/chrome_version_info.h"
37 #include "chrome/common/logging_chrome.h" 37 #include "chrome/common/logging_chrome.h"
38 #include "chrome/common/metrics/proto/omnibox_event.pb.h" 38 #include "chrome/common/metrics/proto/omnibox_event.pb.h"
39 #include "chrome/common/metrics/proto/profiler_event.pb.h" 39 #include "chrome/common/metrics/proto/profiler_event.pb.h"
40 #include "chrome/common/metrics/proto/system_profile.pb.h" 40 #include "chrome/common/metrics/proto/system_profile.pb.h"
41 #include "chrome/common/metrics/variations/variations_util.h" 41 #include "chrome/common/metrics/variations/variations_util.h"
42 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
43 #include "chrome/installer/util/google_update_settings.h" 43 #include "chrome/installer/util/google_update_settings.h"
44 #include "content/public/browser/gpu_data_manager.h" 44 #include "content/public/browser/gpu_data_manager.h"
45 #include "content/public/common/content_client.h" 45 #include "content/public/common/content_client.h"
46 #include "content/public/common/gpu_info.h"
47 #include "device/bluetooth/bluetooth_adapter.h" 46 #include "device/bluetooth/bluetooth_adapter.h"
48 #include "device/bluetooth/bluetooth_adapter_factory.h" 47 #include "device/bluetooth/bluetooth_adapter_factory.h"
49 #include "device/bluetooth/bluetooth_device.h" 48 #include "device/bluetooth/bluetooth_device.h"
50 #include "googleurl/src/gurl.h" 49 #include "googleurl/src/gurl.h"
50 #include "gpu/config/gpu_info.h"
51 #include "ui/gfx/screen.h" 51 #include "ui/gfx/screen.h"
52 #include "webkit/plugins/webplugininfo.h" 52 #include "webkit/plugins/webplugininfo.h"
53 53
54 #if defined(OS_ANDROID) 54 #if defined(OS_ANDROID)
55 #include "base/android/build_info.h" 55 #include "base/android/build_info.h"
56 #endif 56 #endif
57 57
58 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) 58 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name)
59 59
60 #if defined(OS_WIN) 60 #if defined(OS_WIN)
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 { 778 {
779 // Write the XML version. 779 // Write the XML version.
780 // We'll write the protobuf version in RecordEnvironmentProto(). 780 // We'll write the protobuf version in RecordEnvironmentProto().
781 OPEN_ELEMENT_FOR_SCOPE("os"); 781 OPEN_ELEMENT_FOR_SCOPE("os");
782 WriteAttribute("name", base::SysInfo::OperatingSystemName()); 782 WriteAttribute("name", base::SysInfo::OperatingSystemName());
783 WriteAttribute("version", base::SysInfo::OperatingSystemVersion()); 783 WriteAttribute("version", base::SysInfo::OperatingSystemVersion());
784 } 784 }
785 785
786 { 786 {
787 OPEN_ELEMENT_FOR_SCOPE("gpu"); 787 OPEN_ELEMENT_FOR_SCOPE("gpu");
788 const content::GPUInfo& gpu_info = 788 const gpu::GPUInfo& gpu_info =
789 GpuDataManager::GetInstance()->GetGPUInfo(); 789 GpuDataManager::GetInstance()->GetGPUInfo();
790 790
791 // Write the XML version. 791 // Write the XML version.
792 // We'll write the protobuf version in RecordEnvironmentProto(). 792 // We'll write the protobuf version in RecordEnvironmentProto().
793 WriteIntAttribute("vendorid", gpu_info.gpu.vendor_id); 793 WriteIntAttribute("vendorid", gpu_info.gpu.vendor_id);
794 WriteIntAttribute("deviceid", gpu_info.gpu.device_id); 794 WriteIntAttribute("deviceid", gpu_info.gpu.device_id);
795 } 795 }
796 796
797 { 797 {
798 const gfx::Size display_size = GetScreenSize(); 798 const gfx::Size display_size = GetScreenSize();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 if (base::win::IsMetroProcess()) 878 if (base::win::IsMetroProcess())
879 os_name += " (Metro)"; 879 os_name += " (Metro)";
880 #endif 880 #endif
881 os->set_name(os_name); 881 os->set_name(os_name);
882 os->set_version(base::SysInfo::OperatingSystemVersion()); 882 os->set_version(base::SysInfo::OperatingSystemVersion());
883 #if defined(OS_ANDROID) 883 #if defined(OS_ANDROID)
884 os->set_fingerprint( 884 os->set_fingerprint(
885 base::android::BuildInfo::GetInstance()->android_build_fp()); 885 base::android::BuildInfo::GetInstance()->android_build_fp());
886 #endif 886 #endif
887 887
888 const content::GPUInfo& gpu_info = 888 const gpu::GPUInfo& gpu_info =
889 GpuDataManager::GetInstance()->GetGPUInfo(); 889 GpuDataManager::GetInstance()->GetGPUInfo();
890 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); 890 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu();
891 gpu->set_vendor_id(gpu_info.gpu.vendor_id); 891 gpu->set_vendor_id(gpu_info.gpu.vendor_id);
892 gpu->set_device_id(gpu_info.gpu.device_id); 892 gpu->set_device_id(gpu_info.gpu.device_id);
893 gpu->set_driver_version(gpu_info.driver_version); 893 gpu->set_driver_version(gpu_info.driver_version);
894 gpu->set_driver_date(gpu_info.driver_date); 894 gpu->set_driver_date(gpu_info.driver_date);
895 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* 895 SystemProfileProto::Hardware::Graphics::PerformanceStatistics*
896 gpu_performance = gpu->mutable_performance_statistics(); 896 gpu_performance = gpu->mutable_performance_statistics();
897 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); 897 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics);
898 gpu_performance->set_gaming_score(gpu_info.performance_stats.gaming); 898 gpu_performance->set_gaming_score(gpu_info.performance_stats.gaming);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1179
1180 paired_device->set_vendor_prefix(vendor_prefix); 1180 paired_device->set_vendor_prefix(vendor_prefix);
1181 } 1181 }
1182 1182
1183 paired_device->set_vendor_id(device->GetVendorID()); 1183 paired_device->set_vendor_id(device->GetVendorID());
1184 paired_device->set_product_id(device->GetProductID()); 1184 paired_device->set_product_id(device->GetProductID());
1185 paired_device->set_device_id(device->GetDeviceID()); 1185 paired_device->set_device_id(device->GetDeviceID());
1186 } 1186 }
1187 #endif // defined(OS_CHROMEOS) 1187 #endif // defined(OS_CHROMEOS)
1188 } 1188 }
OLDNEW
« no previous file with comments | « chrome/browser/gpu/gpu_feature_checker.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698