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

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

Issue 10389051: Change GPUInfo to handle multiple GPUs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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_util.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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 WriteAttribute("version", base::SysInfo::OperatingSystemVersion()); 673 WriteAttribute("version", base::SysInfo::OperatingSystemVersion());
674 } 674 }
675 675
676 { 676 {
677 OPEN_ELEMENT_FOR_SCOPE("gpu"); 677 OPEN_ELEMENT_FOR_SCOPE("gpu");
678 const content::GPUInfo& gpu_info = 678 const content::GPUInfo& gpu_info =
679 GpuDataManager::GetInstance()->GetGPUInfo(); 679 GpuDataManager::GetInstance()->GetGPUInfo();
680 680
681 // Write the XML version. 681 // Write the XML version.
682 // We'll write the protobuf version in RecordEnvironmentProto(). 682 // We'll write the protobuf version in RecordEnvironmentProto().
683 WriteIntAttribute("vendorid", gpu_info.vendor_id); 683 WriteIntAttribute("vendorid", gpu_info.gpu.vendor_id);
684 WriteIntAttribute("deviceid", gpu_info.device_id); 684 WriteIntAttribute("deviceid", gpu_info.gpu.device_id);
685 } 685 }
686 686
687 { 687 {
688 const gfx::Size display_size = GetScreenSize(); 688 const gfx::Size display_size = GetScreenSize();
689 689
690 // Write the XML version. 690 // Write the XML version.
691 // We'll write the protobuf version in RecordEnvironmentProto(). 691 // We'll write the protobuf version in RecordEnvironmentProto().
692 OPEN_ELEMENT_FOR_SCOPE("display"); 692 OPEN_ELEMENT_FOR_SCOPE("display");
693 WriteIntAttribute("xsize", display_size.width()); 693 WriteIntAttribute("xsize", display_size.width());
694 WriteIntAttribute("ysize", display_size.height()); 694 WriteIntAttribute("ysize", display_size.height());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 hardware->set_dll_base(reinterpret_cast<uint64>(&__ImageBase)); 752 hardware->set_dll_base(reinterpret_cast<uint64>(&__ImageBase));
753 #endif 753 #endif
754 754
755 SystemProfileProto::OS* os = system_profile->mutable_os(); 755 SystemProfileProto::OS* os = system_profile->mutable_os();
756 os->set_name(base::SysInfo::OperatingSystemName()); 756 os->set_name(base::SysInfo::OperatingSystemName());
757 os->set_version(base::SysInfo::OperatingSystemVersion()); 757 os->set_version(base::SysInfo::OperatingSystemVersion());
758 758
759 const content::GPUInfo& gpu_info = 759 const content::GPUInfo& gpu_info =
760 GpuDataManager::GetInstance()->GetGPUInfo(); 760 GpuDataManager::GetInstance()->GetGPUInfo();
761 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu(); 761 SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu();
762 gpu->set_vendor_id(gpu_info.vendor_id); 762 gpu->set_vendor_id(gpu_info.gpu.vendor_id);
763 gpu->set_device_id(gpu_info.device_id); 763 gpu->set_device_id(gpu_info.gpu.device_id);
764 gpu->set_driver_version(gpu_info.driver_version); 764 gpu->set_driver_version(gpu_info.driver_version);
765 gpu->set_driver_date(gpu_info.driver_date); 765 gpu->set_driver_date(gpu_info.driver_date);
766 SystemProfileProto::Hardware::Graphics::PerformanceStatistics* 766 SystemProfileProto::Hardware::Graphics::PerformanceStatistics*
767 gpu_performance = gpu->mutable_performance_statistics(); 767 gpu_performance = gpu->mutable_performance_statistics();
768 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics); 768 gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics);
769 gpu_performance->set_gaming_score(gpu_info.performance_stats.gaming); 769 gpu_performance->set_gaming_score(gpu_info.performance_stats.gaming);
770 gpu_performance->set_overall_score(gpu_info.performance_stats.overall); 770 gpu_performance->set_overall_score(gpu_info.performance_stats.overall);
771 771
772 const gfx::Size display_size = GetScreenSize(); 772 const gfx::Size display_size = GetScreenSize();
773 hardware->set_primary_screen_width(display_size.width()); 773 hardware->set_primary_screen_width(display_size.width());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 i != log.result.end(); ++i) { 945 i != log.result.end(); ++i) {
946 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); 946 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion();
947 suggestion->set_provider(AsOmniboxEventProviderType(i->provider)); 947 suggestion->set_provider(AsOmniboxEventProviderType(i->provider));
948 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); 948 suggestion->set_result_type(AsOmniboxEventResultType(i->type));
949 suggestion->set_relevance(i->relevance); 949 suggestion->set_relevance(i->relevance);
950 suggestion->set_is_starred(i->starred); 950 suggestion->set_is_starred(i->starred);
951 } 951 }
952 952
953 ++num_events_; 953 ++num_events_;
954 } 954 }
OLDNEW
« no previous file with comments | « chrome/browser/gpu_util.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698