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

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

Issue 3412016: FBTF: Move a bunch of code to the headers and remove includes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase + fixed windows issues locally Created 10 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
« no previous file with comments | « net/base/ssl_config_service_defaults.cc ('k') | net/base/transport_security_state.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void SetDelegate(Delegate*); 87 void SetDelegate(Delegate*);
88 88
89 bool Serialise(std::string* output); 89 bool Serialise(std::string* output);
90 bool Deserialise(const std::string& state, bool* dirty); 90 bool Deserialise(const std::string& state, bool* dirty);
91 91
92 private: 92 private:
93 friend class base::RefCountedThreadSafe<TransportSecurityState>; 93 friend class base::RefCountedThreadSafe<TransportSecurityState>;
94 FRIEND_TEST_ALL_PREFIXES(TransportSecurityStateTest, IsPreloaded); 94 FRIEND_TEST_ALL_PREFIXES(TransportSecurityStateTest, IsPreloaded);
95 95
96 ~TransportSecurityState() {} 96 ~TransportSecurityState();
97 97
98 // If we have a callback configured, call it to let our serialiser know that 98 // If we have a callback configured, call it to let our serialiser know that
99 // our state is dirty. 99 // our state is dirty.
100 void DirtyNotify(); 100 void DirtyNotify();
101 101
102 // The set of hosts that have enabled TransportSecurity. The keys here 102 // The set of hosts that have enabled TransportSecurity. The keys here
103 // are SHA256(DNSForm(domain)) where DNSForm converts from dotted form 103 // are SHA256(DNSForm(domain)) where DNSForm converts from dotted form
104 // ('www.google.com') to the form used in DNS: "\x03www\x06google\x03com" 104 // ('www.google.com') to the form used in DNS: "\x03www\x06google\x03com"
105 std::map<std::string, DomainState> enabled_hosts_; 105 std::map<std::string, DomainState> enabled_hosts_;
106 106
107 // Our delegate who gets notified when we are dirtied, or NULL. 107 // Our delegate who gets notified when we are dirtied, or NULL.
108 Delegate* delegate_; 108 Delegate* delegate_;
109 109
110 static std::string CanonicaliseHost(const std::string& host); 110 static std::string CanonicaliseHost(const std::string& host);
111 static bool IsPreloadedSTS(const std::string& canonicalised_host, 111 static bool IsPreloadedSTS(const std::string& canonicalised_host,
112 bool* out_include_subdomains); 112 bool* out_include_subdomains);
113 113
114 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 114 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
115 }; 115 };
116 116
117 } // namespace net 117 } // namespace net
118 118
119 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ 119 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « net/base/ssl_config_service_defaults.cc ('k') | net/base/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698