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

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

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/default_server_bound_cert_store.h" 5 #include "net/base/default_server_bound_cert_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 113
114 int DefaultServerBoundCertStore::GetCertCount() { 114 int DefaultServerBoundCertStore::GetCertCount() {
115 base::AutoLock autolock(lock_); 115 base::AutoLock autolock(lock_);
116 InitIfNecessary(); 116 InitIfNecessary();
117 117
118 return server_bound_certs_.size(); 118 return server_bound_certs_.size();
119 } 119 }
120 120
121 void DefaultServerBoundCertStore::SetForceKeepSessionState() {
122 base::AutoLock autolock(lock_);
123 InitIfNecessary();
124
125 store_->SetForceKeepSessionState();
126 }
127
121 DefaultServerBoundCertStore::~DefaultServerBoundCertStore() { 128 DefaultServerBoundCertStore::~DefaultServerBoundCertStore() {
122 DeleteAllInMemory(); 129 DeleteAllInMemory();
123 } 130 }
124 131
125 void DefaultServerBoundCertStore::DeleteAllInMemory() { 132 void DefaultServerBoundCertStore::DeleteAllInMemory() {
126 base::AutoLock autolock(lock_); 133 base::AutoLock autolock(lock_);
127 134
128 for (ServerBoundCertMap::iterator it = server_bound_certs_.begin(); 135 for (ServerBoundCertMap::iterator it = server_bound_certs_.begin();
129 it != server_bound_certs_.end(); ++it) { 136 it != server_bound_certs_.end(); ++it) {
130 delete it->second; 137 delete it->second;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (store_) 180 if (store_)
174 store_->AddServerBoundCert(*cert); 181 store_->AddServerBoundCert(*cert);
175 server_bound_certs_[server_identifier] = cert; 182 server_bound_certs_[server_identifier] = cert;
176 } 183 }
177 184
178 DefaultServerBoundCertStore::PersistentStore::PersistentStore() {} 185 DefaultServerBoundCertStore::PersistentStore::PersistentStore() {}
179 186
180 DefaultServerBoundCertStore::PersistentStore::~PersistentStore() {} 187 DefaultServerBoundCertStore::PersistentStore::~PersistentStore() {}
181 188
182 } // namespace net 189 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698