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

Side by Side Diff: net/base/test_root_certs_mac.cc

Issue 10785047: Remove all the OS X 10.6 SDK forward declarations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « media/audio/mac/audio_output_mac.cc ('k') | remoting/host/capturer_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/base/test_root_certs.h" 5 #include "net/base/test_root_certs.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
11 #include "net/base/x509_certificate.h" 11 #include "net/base/x509_certificate.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 namespace { 15 namespace {
16 16
17 #if !defined(MAC_OS_X_VERSION_10_6) || \
18 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
19 // Declared in <Security/SecBase.h> of the 10.6 SDK.
20 enum {
21 errSecUnimplemented = -4,
22 };
23 #endif
24
25 typedef OSStatus (*SecTrustSetAnchorCertificatesOnlyFuncPtr)(SecTrustRef, 17 typedef OSStatus (*SecTrustSetAnchorCertificatesOnlyFuncPtr)(SecTrustRef,
26 Boolean); 18 Boolean);
27 19
28 Boolean OurSecCertificateEqual(const void* value1, const void* value2) { 20 Boolean OurSecCertificateEqual(const void* value1, const void* value2) {
29 if (CFGetTypeID(value1) != SecCertificateGetTypeID() || 21 if (CFGetTypeID(value1) != SecCertificateGetTypeID() ||
30 CFGetTypeID(value2) != SecCertificateGetTypeID()) 22 CFGetTypeID(value2) != SecCertificateGetTypeID())
31 return CFEqual(value1, value2); 23 return CFEqual(value1, value2);
32 return X509Certificate::IsSameOSCert( 24 return X509Certificate::IsSameOSCert(
33 reinterpret_cast<SecCertificateRef>(const_cast<void*>(value1)), 25 reinterpret_cast<SecCertificateRef>(const_cast<void*>(value1)),
34 reinterpret_cast<SecCertificateRef>(const_cast<void*>(value2))); 26 reinterpret_cast<SecCertificateRef>(const_cast<void*>(value2)));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 118 }
127 119
128 TestRootCerts::~TestRootCerts() {} 120 TestRootCerts::~TestRootCerts() {}
129 121
130 void TestRootCerts::Init() { 122 void TestRootCerts::Init() {
131 temporary_roots_.reset(CFArrayCreateMutable(kCFAllocatorDefault, 0, 123 temporary_roots_.reset(CFArrayCreateMutable(kCFAllocatorDefault, 0,
132 &kCertArrayCallbacks)); 124 &kCertArrayCallbacks));
133 } 125 }
134 126
135 } // namespace net 127 } // namespace net
OLDNEW
« no previous file with comments | « media/audio/mac/audio_output_mac.cc ('k') | remoting/host/capturer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698