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

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

Issue 8573031: base::Bind fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed net_unittest Created 9 years, 1 month 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 "net/base/default_origin_bound_cert_store.h" 5 #include "net/base/default_origin_bound_cert_store.h"
6 6
7 #include "base/bind.h"
7 #include "base/message_loop.h" 8 #include "base/message_loop.h"
8 9
9 namespace net { 10 namespace net {
10 11
11 // static 12 // static
12 const size_t DefaultOriginBoundCertStore::kMaxCerts = 3300; 13 const size_t DefaultOriginBoundCertStore::kMaxCerts = 3300;
13 14
14 DefaultOriginBoundCertStore::DefaultOriginBoundCertStore( 15 DefaultOriginBoundCertStore::DefaultOriginBoundCertStore(
15 PersistentStore* store) 16 PersistentStore* store)
16 : initialized_(false), 17 : initialized_(false),
17 store_(store) {} 18 store_(store) {}
18 19
19 void DefaultOriginBoundCertStore::FlushStore(Task* completion_task) { 20 void DefaultOriginBoundCertStore::FlushStore(
21 const base::Closure& completion_task) {
20 base::AutoLock autolock(lock_); 22 base::AutoLock autolock(lock_);
21 23
22 if (initialized_ && store_) 24 if (initialized_ && store_)
23 store_->Flush(completion_task); 25 store_->Flush(completion_task);
24 else if (completion_task) 26 else if (!completion_task.is_null())
25 MessageLoop::current()->PostTask(FROM_HERE, completion_task); 27 MessageLoop::current()->PostTask(FROM_HERE, completion_task);
26 } 28 }
27 29
28 bool DefaultOriginBoundCertStore::GetOriginBoundCert( 30 bool DefaultOriginBoundCertStore::GetOriginBoundCert(
29 const std::string& origin, 31 const std::string& origin,
30 std::string* private_key_result, 32 std::string* private_key_result,
31 std::string* cert_result) { 33 std::string* cert_result) {
32 base::AutoLock autolock(lock_); 34 base::AutoLock autolock(lock_);
33 InitIfNecessary(); 35 InitIfNecessary();
34 36
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 const std::string& origin, 166 const std::string& origin,
165 const std::string& private_key, 167 const std::string& private_key,
166 const std::string& cert) 168 const std::string& cert)
167 : origin_(origin), 169 : origin_(origin),
168 private_key_(private_key), 170 private_key_(private_key),
169 cert_(cert) {} 171 cert_(cert) {}
170 172
171 DefaultOriginBoundCertStore::PersistentStore::PersistentStore() {} 173 DefaultOriginBoundCertStore::PersistentStore::PersistentStore() {}
172 174
173 } // namespace net 175 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698