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

Side by Side Diff: crypto/cssm_init.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/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 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 #include "base/crypto/cssm_init.h" 5 #include "base/crypto/cssm_init.h"
6 6
7 #include <Security/SecBase.h> 7 #include <Security/SecBase.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"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 bool tp_loaded_; // True if gGuidAppleX509TP has been loaded. 148 bool tp_loaded_; // True if gGuidAppleX509TP has been loaded.
149 CSSM_CSP_HANDLE csp_handle_; 149 CSSM_CSP_HANDLE csp_handle_;
150 CSSM_CL_HANDLE cl_handle_; 150 CSSM_CL_HANDLE cl_handle_;
151 CSSM_TP_HANDLE tp_handle_; 151 CSSM_TP_HANDLE tp_handle_;
152 152
153 friend struct DefaultSingletonTraits<CSSMInitSingleton>; 153 friend struct DefaultSingletonTraits<CSSMInitSingleton>;
154 }; 154 };
155 155
156 } // namespace 156 } // namespace
157 157
158 namespace base { 158 namespace crypto {
159 159
160 void EnsureCSSMInit() { 160 void EnsureCSSMInit() {
161 CSSMInitSingleton::GetInstance(); 161 CSSMInitSingleton::GetInstance();
162 } 162 }
163 163
164 CSSM_CSP_HANDLE GetSharedCSPHandle() { 164 CSSM_CSP_HANDLE GetSharedCSPHandle() {
165 return CSSMInitSingleton::GetInstance()->csp_handle(); 165 return CSSMInitSingleton::GetInstance()->csp_handle();
166 } 166 }
167 167
168 CSSM_CL_HANDLE GetSharedCLHandle() { 168 CSSM_CL_HANDLE GetSharedCLHandle() {
(...skipping 25 matching lines...) Expand all
194 memset(&data_, 0, sizeof(data_)); 194 memset(&data_, 0, sizeof(data_));
195 } 195 }
196 196
197 ScopedCSSMData::~ScopedCSSMData() { 197 ScopedCSSMData::~ScopedCSSMData() {
198 if (data_.Data) { 198 if (data_.Data) {
199 CSSMFree(data_.Data); 199 CSSMFree(data_.Data);
200 data_.Data = NULL; 200 data_.Data = NULL;
201 } 201 }
202 } 202 }
203 203
204 } // namespace base 204 } // namespace crypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698