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

Unified Diff: net/base/test_root_certs_win.cc

Issue 8004004: Update Windows version macros to Win 7 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/test_root_certs_win.cc
===================================================================
--- net/base/test_root_certs_win.cc (revision 102509)
+++ net/base/test_root_certs_win.cc (working copy)
@@ -10,6 +10,8 @@
#include "base/basictypes.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/win/win_util.h"
+#include "base/win/windows_version.h"
#include "net/base/x509_certificate.h"
namespace net {
@@ -172,6 +174,12 @@
if (IsEmpty())
return NULL; // Default chain engine will suffice.
+ // Windows versions before 7 don't accept the struct size for later versions.
+ // We report the size of the old struct since we don't need the new members.
+ static const DWORD kSizeofCertChainEngineConfig =
+ SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(
+ CERT_CHAIN_ENGINE_CONFIG, CycleDetectionModulus);
+
// Each HCERTCHAINENGINE caches both the configured system stores and
// information about each chain that has been built. In order to ensure
// that changes to |temporary_roots_| are properly propagated and that the
@@ -180,7 +188,7 @@
// should re-open the root store, ensuring the most recent changes are
// visible.
CERT_CHAIN_ENGINE_CONFIG engine_config = {
- sizeof(engine_config)
+ kSizeofCertChainEngineConfig
};
engine_config.dwFlags =
CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE |
Property changes on: net\base\test_root_certs_win.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698