| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) { | 70 int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) { |
| 71 static WinSubVersion sub_version = kNumWinSubVersions; | 71 static WinSubVersion sub_version = kNumWinSubVersions; |
| 72 if (sub_version == kNumWinSubVersions) { | 72 if (sub_version == kNumWinSubVersions) { |
| 73 sub_version = kWinOthers; | 73 sub_version = kWinOthers; |
| 74 std::string version_str = base::SysInfo::OperatingSystemVersion(); | 74 std::string version_str = base::SysInfo::OperatingSystemVersion(); |
| 75 size_t pos = version_str.find_first_not_of("0123456789."); | 75 size_t pos = version_str.find_first_not_of("0123456789."); |
| 76 if (pos != std::string::npos) | 76 if (pos != std::string::npos) |
| 77 version_str = version_str.substr(0, pos); | 77 version_str = version_str.substr(0, pos); |
| 78 base::Version os_version(version_str); | 78 Version os_version(version_str); |
| 79 if (os_version.IsValid() && os_version.components().size() >= 2) { | 79 if (os_version.IsValid() && os_version.components().size() >= 2) { |
| 80 const std::vector<uint16>& version_numbers = os_version.components(); | 80 const std::vector<uint16>& version_numbers = os_version.components(); |
| 81 if (version_numbers[0] == 5) | 81 if (version_numbers[0] == 5) |
| 82 sub_version = kWinXP; | 82 sub_version = kWinXP; |
| 83 else if (version_numbers[0] == 6 && version_numbers[1] == 0) | 83 else if (version_numbers[0] == 6 && version_numbers[1] == 0) |
| 84 sub_version = kWinVista; | 84 sub_version = kWinVista; |
| 85 else if (version_numbers[0] == 6 && version_numbers[1] == 1) | 85 else if (version_numbers[0] == 6 && version_numbers[1] == 1) |
| 86 sub_version = kWin7; | 86 sub_version = kWin7; |
| 87 else if (version_numbers[0] == 6 && version_numbers[1] == 2) | 87 else if (version_numbers[0] == 6 && version_numbers[1] == 2) |
| 88 sub_version = kWin8; | 88 sub_version = kWin8; |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 | 1177 |
| 1178 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1178 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
| 1179 gpu_process_accessible_ = false; | 1179 gpu_process_accessible_ = false; |
| 1180 gpu_info_.finalized = true; | 1180 gpu_info_.finalized = true; |
| 1181 complete_gpu_info_already_requested_ = true; | 1181 complete_gpu_info_already_requested_ = true; |
| 1182 // Some observers might be waiting. | 1182 // Some observers might be waiting. |
| 1183 NotifyGpuInfoUpdate(); | 1183 NotifyGpuInfoUpdate(); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 } // namespace content | 1186 } // namespace content |
| OLD | NEW |