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

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

Issue 6816027: Make the windows_version.h functions threadsafe by using a singleton. Add accessors to the singl... (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
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
===================================================================
--- chrome/installer/util/install_util.cc (revision 80824)
+++ chrome/installer/util/install_util.cc (working copy)
@@ -19,6 +19,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#include "base/sys_info.h"
#include "base/values.h"
#include "base/version.h"
#include "base/win/registry.h"
@@ -136,15 +137,13 @@
}
bool InstallUtil::IsOSSupported() {
- int major, minor;
- base::win::Version version = base::win::GetVersion();
- base::win::GetServicePackLevel(&major, &minor);
-
// We do not support Win2K or older, or XP without service pack 2.
- VLOG(1) << "Windows Version: " << version
- << ", Service Pack: " << major << "." << minor;
+ VLOG(1) << base::SysInfo::OperatingSystemName() << ' '
+ << base::SysInfo::OperatingSystemVersion();
+ base::win::Version version = base::win::GetVersion();
return (version > base::win::VERSION_XP) ||
- (version == base::win::VERSION_XP && major >= 2);
+ ((version == base::win::VERSION_XP) &&
+ (base::win::OSInfo::GetInstance()->service_pack().major >= 2));
}
void InstallUtil::WriteInstallerResult(bool system_install,
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698