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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 985573003: Support 32-bit subversion fields in base::Version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename back Created 5 years, 9 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
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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<uint32>& 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;
89 } 89 }
90 } 90 }
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1141 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1142 #if defined(OS_WIN) 1142 #if defined(OS_WIN)
1143 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1143 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1144 #endif 1144 #endif
1145 complete_gpu_info_already_requested_ = true; 1145 complete_gpu_info_already_requested_ = true;
1146 // Some observers might be waiting. 1146 // Some observers might be waiting.
1147 NotifyGpuInfoUpdate(); 1147 NotifyGpuInfoUpdate();
1148 } 1148 }
1149 1149
1150 } // namespace content 1150 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698