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

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

Issue 7966005: Move TransportSecurityPersister completely to IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TRANSPORT_SECURITY_STATE_H_ 5 #ifndef NET_BASE_TRANSPORT_SECURITY_STATE_H_
6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ 6 #define NET_BASE_TRANSPORT_SECURITY_STATE_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/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/time.h" 16 #include "base/time.h"
17 #include "net/base/net_export.h" 17 #include "net/base/net_export.h"
18 #include "net/base/x509_cert_types.h" 18 #include "net/base/x509_cert_types.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 // TransportSecurityState 22 // TransportSecurityState
23 // 23 //
24 // Tracks which hosts have enabled *-Transport-Security. This object manages 24 // Tracks which hosts have enabled *-Transport-Security. This object manages
25 // the in-memory store. A separate object must register itself with this object 25 // the in-memory store. A separate object must register itself with this object
26 // in order to persist the state to disk. 26 // in order to persist the state to disk.
27 //
28 // TODO(phajdan.jr): Convert this to non-thread-safe non-ref-counted
29 // for simplicity.
27 class NET_EXPORT TransportSecurityState : 30 class NET_EXPORT TransportSecurityState :
28 public base::RefCountedThreadSafe<TransportSecurityState> { 31 public base::RefCountedThreadSafe<TransportSecurityState> {
29 public: 32 public:
30 // If non-empty, |hsts_hosts| is a JSON-formatted string to treat as if it 33 // If non-empty, |hsts_hosts| is a JSON-formatted string to treat as if it
31 // were a built-in entry (same format as persisted metadata in the 34 // were a built-in entry (same format as persisted metadata in the
32 // TransportSecurityState file). 35 // TransportSecurityState file).
33 explicit TransportSecurityState(const std::string& hsts_hosts); 36 explicit TransportSecurityState(const std::string& hsts_hosts);
34 37
35 // A DomainState is the information that we persist about a given domain. 38 // A DomainState is the information that we persist about a given domain.
36 struct NET_EXPORT DomainState { 39 struct NET_EXPORT DomainState {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 172
170 // Our delegate who gets notified when we are dirtied, or NULL. 173 // Our delegate who gets notified when we are dirtied, or NULL.
171 Delegate* delegate_; 174 Delegate* delegate_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 176 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
174 }; 177 };
175 178
176 } // namespace net 179 } // namespace net
177 180
178 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ 181 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698