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

Unified Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 6713107: Make the windows_version.h functions threadsafe by using a singleton. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/google_chrome_distribution.cc
===================================================================
--- chrome/installer/util/google_chrome_distribution.cc (revision 80667)
+++ chrome/installer/util/google_chrome_distribution.cc (working copy)
@@ -326,14 +326,10 @@
// need to escape the string before using it in a URL.
const std::wstring kVersionParam = L"crversion";
const std::wstring kOSParam = L"os";
- std::wstring os_version = L"na";
- OSVERSIONINFO version_info;
- version_info.dwOSVersionInfoSize = sizeof(version_info);
- if (GetVersionEx(&version_info)) {
- os_version = StringPrintf(L"%d.%d.%d", version_info.dwMajorVersion,
- version_info.dwMinorVersion,
- version_info.dwBuildNumber);
- }
+ const int* version_number =
+ base::win::OSInfo::GetInstance()->version_number();
+ std::wstring os_version = StringPrintf(L"%d.%d.%d", version_number[0],
+ version_number[1], version_number[2]);
FilePath iexplore;
if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore))

Powered by Google App Engine
This is Rietveld 408576698