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

Side by Side Diff: chrome/browser/ssl/ssl_error_classification.h

Issue 1227173006: New SSL metric added: Likely From Same Domain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolving comments Created 5 years, 5 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 | « no previous file | chrome/browser/ssl/ssl_error_classification.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ 6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // a.b.example.com ~ *.example.com --> true 110 // a.b.example.com ~ *.example.com --> true
111 // b.example.com ~ *.example.com --> false 111 // b.example.com ~ *.example.com --> false
112 bool IsSubDomainOutsideWildcard(const Tokens& hostname) const; 112 bool IsSubDomainOutsideWildcard(const Tokens& hostname) const;
113 113
114 // Returns true if the certificate is a shared certificate. Note - This 114 // Returns true if the certificate is a shared certificate. Note - This
115 // function should be used with caution (only for UMA histogram) as an 115 // function should be used with caution (only for UMA histogram) as an
116 // attacker could easily get a certificate with more than 5 names in the SAN 116 // attacker could easily get a certificate with more than 5 names in the SAN
117 // fields. 117 // fields.
118 bool IsCertLikelyFromMultiTenantHosting() const; 118 bool IsCertLikelyFromMultiTenantHosting() const;
119 119
120 // Returns true if the hostname in |request_url_| has the same domain
121 // (effective TLD + 1 label) as at least one of the subject
122 // alternative names in |cert_|.
123 bool IsCertLikelyFromSameDomain() const;
124
120 static std::vector<Tokens> GetTokenizedDNSNames( 125 static std::vector<Tokens> GetTokenizedDNSNames(
121 const std::vector<std::string>& dns_names); 126 const std::vector<std::string>& dns_names);
122 127
123 // If |potential_subdomain| is a subdomain of |parent|, returns the 128 // If |potential_subdomain| is a subdomain of |parent|, returns the
124 // number of DNS labels by which |potential_subdomain| is under 129 // number of DNS labels by which |potential_subdomain| is under
125 // |parent|. Otherwise, returns 0. 130 // |parent|. Otherwise, returns 0.
126 // 131 //
127 // For example, 132 // For example,
128 // 133 //
129 // FindSubDomainDifference(Tokenize("a.b.example.com"), 134 // FindSubDomainDifference(Tokenize("a.b.example.com"),
(...skipping 25 matching lines...) Expand all
155 bool captive_portal_probe_completed_; 160 bool captive_portal_probe_completed_;
156 // Did the captive portal probe receive an error or get a non-HTTP response? 161 // Did the captive portal probe receive an error or get a non-HTTP response?
157 bool captive_portal_no_response_; 162 bool captive_portal_no_response_;
158 // Was a captive portal detected? 163 // Was a captive portal detected?
159 bool captive_portal_detected_; 164 bool captive_portal_detected_;
160 165
161 content::NotificationRegistrar registrar_; 166 content::NotificationRegistrar registrar_;
162 }; 167 };
163 168
164 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ 169 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_error_classification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698