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

Side by Side Diff: net/base/test_root_certs.h

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_BASE_TEST_ROOT_CERTS_H_ 5 #ifndef NET_BASE_TEST_ROOT_CERTS_H_
6 #define NET_BASE_TEST_ROOT_CERTS_H_ 6 #define NET_BASE_TEST_ROOT_CERTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "net/base/net_api.h" 11 #include "net/base/net_export.h"
12 12
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 #include <windows.h> 14 #include <windows.h>
15 #include <wincrypt.h> 15 #include <wincrypt.h>
16 #elif defined(OS_MACOSX) 16 #elif defined(OS_MACOSX)
17 #include <CoreFoundation/CFArray.h> 17 #include <CoreFoundation/CFArray.h>
18 #include <Security/SecTrust.h> 18 #include <Security/SecTrust.h>
19 #include "base/mac/scoped_cftyperef.h" 19 #include "base/mac/scoped_cftyperef.h"
20 #elif defined(USE_NSS) 20 #elif defined(USE_NSS)
21 #include <list> 21 #include <list>
22 #endif 22 #endif
23 23
24 class FilePath; 24 class FilePath;
25 25
26 namespace net { 26 namespace net {
27 27
28 class X509Certificate; 28 class X509Certificate;
29 29
30 // TestRootCerts is a helper class for unit tests that is used to 30 // TestRootCerts is a helper class for unit tests that is used to
31 // artificially mark a certificate as trusted, independent of the local 31 // artificially mark a certificate as trusted, independent of the local
32 // machine configuration. 32 // machine configuration.
33 class NET_TEST TestRootCerts { 33 class NET_EXPORT_PRIVATE TestRootCerts {
34 public: 34 public:
35 // Obtains the Singleton instance to the trusted certificates. 35 // Obtains the Singleton instance to the trusted certificates.
36 static TestRootCerts* GetInstance(); 36 static TestRootCerts* GetInstance();
37 37
38 // Returns true if an instance exists, without forcing an initialization. 38 // Returns true if an instance exists, without forcing an initialization.
39 static bool HasInstance(); 39 static bool HasInstance();
40 40
41 // Marks |certificate| as trusted for X509Certificate::Verify(). Returns 41 // Marks |certificate| as trusted for X509Certificate::Verify(). Returns
42 // false if the certificate could not be marked trusted. 42 // false if the certificate could not be marked trusted.
43 bool Add(X509Certificate* certificate); 43 bool Add(X509Certificate* certificate);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // True if there are no temporarily trusted root certificates. 95 // True if there are no temporarily trusted root certificates.
96 bool empty_; 96 bool empty_;
97 #endif 97 #endif
98 98
99 DISALLOW_COPY_AND_ASSIGN(TestRootCerts); 99 DISALLOW_COPY_AND_ASSIGN(TestRootCerts);
100 }; 100 };
101 101
102 } // namespace net 102 } // namespace net
103 103
104 #endif // NET_BASE_TEST_ROOT_CERTS_H_ 104 #endif // NET_BASE_TEST_ROOT_CERTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698