OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/gpu/gpu_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 }; | 69 }; |
70 | 70 |
71 int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) { | 71 int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) { |
72 static WinSubVersion sub_version = kNumWinSubVersions; | 72 static WinSubVersion sub_version = kNumWinSubVersions; |
73 if (sub_version == kNumWinSubVersions) { | 73 if (sub_version == kNumWinSubVersions) { |
74 sub_version = kWinOthers; | 74 sub_version = kWinOthers; |
75 std::string version_str = base::SysInfo::OperatingSystemVersion(); | 75 std::string version_str = base::SysInfo::OperatingSystemVersion(); |
76 size_t pos = version_str.find_first_not_of("0123456789."); | 76 size_t pos = version_str.find_first_not_of("0123456789."); |
77 if (pos != std::string::npos) | 77 if (pos != std::string::npos) |
78 version_str = version_str.substr(0, pos); | 78 version_str = version_str.substr(0, pos); |
79 Version os_version(version_str); | 79 base::Version os_version(version_str); |
80 if (os_version.IsValid() && os_version.components().size() >= 2) { | 80 if (os_version.IsValid() && os_version.components().size() >= 2) { |
81 const std::vector<uint32_t>& version_numbers = os_version.components(); | 81 const std::vector<uint32_t>& version_numbers = os_version.components(); |
82 if (version_numbers[0] == 5) | 82 if (version_numbers[0] == 5) |
83 sub_version = kWinXP; | 83 sub_version = kWinXP; |
84 else if (version_numbers[0] == 6 && version_numbers[1] == 0) | 84 else if (version_numbers[0] == 6 && version_numbers[1] == 0) |
85 sub_version = kWinVista; | 85 sub_version = kWinVista; |
86 else if (version_numbers[0] == 6 && version_numbers[1] == 1) | 86 else if (version_numbers[0] == 6 && version_numbers[1] == 1) |
87 sub_version = kWin7; | 87 sub_version = kWin7; |
88 else if (version_numbers[0] == 6 && version_numbers[1] == 2) | 88 else if (version_numbers[0] == 6 && version_numbers[1] == 2) |
89 sub_version = kWin8; | 89 sub_version = kWin8; |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1205 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1206 #if defined(OS_WIN) | 1206 #if defined(OS_WIN) |
1207 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1207 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1208 #endif | 1208 #endif |
1209 complete_gpu_info_already_requested_ = true; | 1209 complete_gpu_info_already_requested_ = true; |
1210 // Some observers might be waiting. | 1210 // Some observers might be waiting. |
1211 NotifyGpuInfoUpdate(); | 1211 NotifyGpuInfoUpdate(); |
1212 } | 1212 } |
1213 | 1213 |
1214 } // namespace content | 1214 } // namespace content |
OLD | NEW |