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

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

Issue 19269012: Don't persist HPKP if PrivacyMode is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address codereview nit and fix compilation error in OFFICIAL_BUILD. Created 7 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
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 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_
6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // If an entry is deleted, the new state will be persisted through 194 // If an entry is deleted, the new state will be persisted through
195 // the Delegate (if any). 195 // the Delegate (if any).
196 bool DeleteDynamicDataForHost(const std::string& host); 196 bool DeleteDynamicDataForHost(const std::string& host);
197 197
198 // Returns true and updates |*result| iff there is a DomainState for 198 // Returns true and updates |*result| iff there is a DomainState for
199 // |host|. 199 // |host|.
200 // 200 //
201 // If |sni_enabled| is true, searches the static pins defined for 201 // If |sni_enabled| is true, searches the static pins defined for
202 // SNI-using hosts as well as the rest of the pins. 202 // SNI-using hosts as well as the rest of the pins.
203 // 203 //
204 // If |allow_dynamic| is true, then dynamic state is returned if present,
205 // otherwise only static state is used.
206 //
204 // If |host| matches both an exact entry and is a subdomain of another 207 // If |host| matches both an exact entry and is a subdomain of another
205 // entry, the exact match determines the return value. 208 // entry, the exact match determines the return value.
206 // 209 //
207 // Note that this method is not const because it opportunistically removes 210 // Note that this method is not const because it opportunistically removes
208 // entries that have expired. 211 // entries that have expired.
209 bool GetDomainState(const std::string& host, 212 bool GetDomainState(const std::string& host,
210 bool sni_enabled, 213 bool sni_enabled,
214 bool allow_dynamic,
211 DomainState* result); 215 DomainState* result);
212 216
213 // Processes an HSTS header value from the host, adding entries to 217 // Processes an HSTS header value from the host, adding entries to
214 // dynamic state if necessary. 218 // dynamic state if necessary.
215 bool AddHSTSHeader(const std::string& host, const std::string& value); 219 bool AddHSTSHeader(const std::string& host, const std::string& value);
216 220
217 // Processes an HPKP header value from the host, adding entries to 221 // Processes an HPKP header value from the host, adding entries to
218 // dynamic state if necessary. ssl_info is used to check that 222 // dynamic state if necessary. ssl_info is used to check that
219 // the specified pins overlap with the certificate chain. 223 // the specified pins overlap with the certificate chain.
220 bool AddHPKPHeader(const std::string& host, const std::string& value, 224 bool AddHPKPHeader(const std::string& host, const std::string& value,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 DomainStateMap enabled_hosts_; 323 DomainStateMap enabled_hosts_;
320 324
321 Delegate* delegate_; 325 Delegate* delegate_;
322 326
323 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 327 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
324 }; 328 };
325 329
326 } // namespace net 330 } // namespace net
327 331
328 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 332 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698