OLD | NEW |
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 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "chrome/browser/ssl/ssl_error_classification.h" | 7 #include "chrome/browser/ssl/ssl_error_classification.h" |
8 | 8 |
9 #include "base/build_time.h" | 9 #include "base/build_time.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 break; | 226 break; |
227 } | 227 } |
228 default: | 228 default: |
229 break; | 229 break; |
230 } | 230 } |
231 UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.connection_type", | 231 UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.connection_type", |
232 net::NetworkChangeNotifier::GetConnectionType(), | 232 net::NetworkChangeNotifier::GetConnectionType(), |
233 net::NetworkChangeNotifier::CONNECTION_LAST); | 233 net::NetworkChangeNotifier::CONNECTION_LAST); |
234 } | 234 } |
235 | 235 |
| 236 const GURL& SSLErrorClassification::GetRequestURL() { |
| 237 return request_url_; |
| 238 } |
| 239 |
236 base::TimeDelta SSLErrorClassification::TimePassedSinceExpiry() const { | 240 base::TimeDelta SSLErrorClassification::TimePassedSinceExpiry() const { |
237 base::TimeDelta delta = current_time_ - cert_.valid_expiry(); | 241 base::TimeDelta delta = current_time_ - cert_.valid_expiry(); |
238 return delta; | 242 return delta; |
239 } | 243 } |
240 | 244 |
241 bool SSLErrorClassification::IsUserClockInThePast(const base::Time& time_now) { | 245 bool SSLErrorClassification::IsUserClockInThePast(const base::Time& time_now) { |
242 #if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) | 246 #if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) |
243 return false; | 247 return false; |
244 #else | 248 #else |
245 base::Time build_time = base::GetBuildTime(); | 249 base::Time build_time = base::GetBuildTime(); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 // sure we don't clear the captive protal flag, since the interstitial was | 497 // sure we don't clear the captive protal flag, since the interstitial was |
494 // potentially caused by the captive portal. | 498 // potentially caused by the captive portal. |
495 captive_portal_detected_ = captive_portal_detected_ || | 499 captive_portal_detected_ = captive_portal_detected_ || |
496 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); | 500 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); |
497 // Also keep track of non-HTTP portals and error cases. | 501 // Also keep track of non-HTTP portals and error cases. |
498 captive_portal_no_response_ = captive_portal_no_response_ || | 502 captive_portal_no_response_ = captive_portal_no_response_ || |
499 (results->result == captive_portal::RESULT_NO_RESPONSE); | 503 (results->result == captive_portal::RESULT_NO_RESPONSE); |
500 } | 504 } |
501 #endif | 505 #endif |
502 } | 506 } |
OLD | NEW |