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

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

Issue 8364023: Report second-level domains for UMA on pin failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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_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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Note that like HasMetadata, if |host| matches both an exact entry and is a 121 // Note that like HasMetadata, if |host| matches both an exact entry and is a
122 // subdomain of another entry, the exact match determines the return value. 122 // subdomain of another entry, the exact match determines the return value.
123 // 123 //
124 // This function is used by ChromeFraudulentCertificateReporter to determine 124 // This function is used by ChromeFraudulentCertificateReporter to determine
125 // whether or not we can automatically post fraudulent certificate reports to 125 // whether or not we can automatically post fraudulent certificate reports to
126 // Google; we only do so automatically in cases when the user was trying to 126 // Google; we only do so automatically in cases when the user was trying to
127 // connect to Google in the first place. 127 // connect to Google in the first place.
128 static bool IsGooglePinnedProperty(const std::string& host, 128 static bool IsGooglePinnedProperty(const std::string& host,
129 bool sni_available); 129 bool sni_available);
130 130
131 // Report UMA statistics upon public key pin failure. Reports only down to
wtc 2011/10/27 22:21:42 Nit: Report => Reports
palmer 2011/10/28 00:24:39 Done.
132 // the second-level domain of |host| (e.g. google.com if |host| is
133 // mail.google.com), and only if |host| is a preloaded STS host.
134 static void ReportUMAOnPinFailure(const std::string& host);
135
131 // Deletes all records created since a given time. 136 // Deletes all records created since a given time.
132 void DeleteSince(const base::Time& time); 137 void DeleteSince(const base::Time& time);
133 138
134 // Returns |true| if |value| parses as a valid *-Transport-Security 139 // Returns |true| if |value| parses as a valid *-Transport-Security
135 // header value. The values of max-age and and includeSubDomains are 140 // header value. The values of max-age and and includeSubDomains are
136 // returned in |max_age| and |include_subdomains|, respectively. The out 141 // returned in |max_age| and |include_subdomains|, respectively. The out
137 // parameters are not modified if the function returns |false|. 142 // parameters are not modified if the function returns |false|.
138 static bool ParseHeader(const std::string& value, 143 static bool ParseHeader(const std::string& value,
139 int* max_age, 144 int* max_age,
140 bool* include_subdomains); 145 bool* include_subdomains);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 187
183 // Our delegate who gets notified when we are dirtied, or NULL. 188 // Our delegate who gets notified when we are dirtied, or NULL.
184 Delegate* delegate_; 189 Delegate* delegate_;
185 190
186 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 191 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
187 }; 192 };
188 193
189 } // namespace net 194 } // namespace net
190 195
191 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ 196 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/transport_security_state.cc » ('j') | net/base/transport_security_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698