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

Unified Diff: base/win/win_util.cc

Issue 581803002: Component updater must fallback on using HTTP on Windows XPSP2 and below (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 3 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 | « base/win/win_util.h ('k') | chrome/browser/component_updater/chrome_component_updater_configurator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util.cc
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index ee923522fc9f3342a5a6e856931ff11c7fb7545d..69e14e4f6aac04ca330890a177975e15dafc4039 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -370,6 +370,25 @@ void SetDomainStateForTesting(bool state) {
g_domain_state = state ? ENROLLED : NOT_ENROLLED;
}
+bool MaybeHasSHA256Support() {
+ const base::win::OSInfo* os_info = base::win::OSInfo::GetInstance();
+
+ if (os_info->version() == base::win::VERSION_PRE_XP)
+ return false; // Too old to have it and this OS is not supported anyway.
+
+ if (os_info->version() == base::win::VERSION_XP)
+ return os_info->service_pack().major >= 3; // Windows XP SP3 has it.
+
+ // Assume it is missing in this case, although it may not be. This category
+ // includes Windows XP x64, and Windows Server, where a hotfix could be
+ // deployed.
+ if (os_info->version() == base::win::VERSION_SERVER_2003)
+ return false;
+
+ DCHECK(os_info->version() >= base::win::VERSION_VISTA);
+ return true; // New enough to have SHA-256 support.
+}
+
} // namespace win
} // namespace base
« no previous file with comments | « base/win/win_util.h ('k') | chrome/browser/component_updater/chrome_component_updater_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698