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

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

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 #ifndef NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ 5 #ifndef NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_
6 #define NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ 6 #define NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
15 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
16 #include "net/base/net_export.h" 17 #include "net/base/net_export.h"
17 #include "net/base/origin_bound_cert_store.h" 18 #include "net/base/origin_bound_cert_store.h"
18 19
19 class Task; 20 class Task;
20 21
21 namespace net { 22 namespace net {
22 23
(...skipping 21 matching lines...) Expand all
44 // backing store will be updated. 45 // backing store will be updated.
45 explicit DefaultOriginBoundCertStore(PersistentStore* store); 46 explicit DefaultOriginBoundCertStore(PersistentStore* store);
46 47
47 virtual ~DefaultOriginBoundCertStore(); 48 virtual ~DefaultOriginBoundCertStore();
48 49
49 // Flush the backing store (if any) to disk and post the given task when done. 50 // Flush the backing store (if any) to disk and post the given task when done.
50 // WARNING: THE CALLBACK WILL RUN ON A RANDOM THREAD. IT MUST BE THREAD SAFE. 51 // WARNING: THE CALLBACK WILL RUN ON A RANDOM THREAD. IT MUST BE THREAD SAFE.
51 // It may be posted to the current thread, or it may run on the thread that 52 // It may be posted to the current thread, or it may run on the thread that
52 // actually does the flushing. Your Task should generally post a notification 53 // actually does the flushing. Your Task should generally post a notification
53 // to the thread you actually want to be notified on. 54 // to the thread you actually want to be notified on.
54 void FlushStore(Task* completion_task); 55 void FlushStore(const base::Closure& completion_task);
wtc 2011/11/16 06:30:18 Should we rename the function parameter because it
groby-ooo-7-16 2011/11/16 22:24:58 We still call it a task pretty much everywhere els
55 56
56 // OriginBoundCertStore implementation. 57 // OriginBoundCertStore implementation.
57 virtual bool GetOriginBoundCert(const std::string& origin, 58 virtual bool GetOriginBoundCert(const std::string& origin,
58 std::string* private_key_result, 59 std::string* private_key_result,
59 std::string* cert_result) OVERRIDE; 60 std::string* cert_result) OVERRIDE;
60 virtual void SetOriginBoundCert(const std::string& origin, 61 virtual void SetOriginBoundCert(const std::string& origin,
61 const std::string& private_key, 62 const std::string& private_key,
62 const std::string& cert) OVERRIDE; 63 const std::string& cert) OVERRIDE;
63 virtual void DeleteOriginBoundCert(const std::string& origin) OVERRIDE; 64 virtual void DeleteOriginBoundCert(const std::string& origin) OVERRIDE;
64 virtual void DeleteAll() OVERRIDE; 65 virtual void DeleteAll() OVERRIDE;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 148
148 virtual void AddOriginBoundCert(const OriginBoundCert& cert) = 0; 149 virtual void AddOriginBoundCert(const OriginBoundCert& cert) = 0;
149 150
150 virtual void DeleteOriginBoundCert(const OriginBoundCert& cert) = 0; 151 virtual void DeleteOriginBoundCert(const OriginBoundCert& cert) = 0;
151 152
152 // Sets the value of the user preference whether the persistent storage 153 // Sets the value of the user preference whether the persistent storage
153 // must be deleted upon destruction. 154 // must be deleted upon destruction.
154 virtual void SetClearLocalStateOnExit(bool clear_local_state) = 0; 155 virtual void SetClearLocalStateOnExit(bool clear_local_state) = 0;
155 156
156 // Flush the store and post the given Task when complete. 157 // Flush the store and post the given Task when complete.
157 virtual void Flush(Task* completion_task) = 0; 158 virtual void Flush(const base::Closure& completion_task) = 0;
158 159
159 protected: 160 protected:
160 PersistentStore(); 161 PersistentStore();
161 162
162 private: 163 private:
163 DISALLOW_COPY_AND_ASSIGN(PersistentStore); 164 DISALLOW_COPY_AND_ASSIGN(PersistentStore);
164 }; 165 };
165 166
166 } // namespace net 167 } // namespace net
167 168
168 #endif // NET_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ 169 #endif // NET_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/sqlite_persistent_cookie_store.cc ('k') | net/base/default_origin_bound_cert_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698