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

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

Issue 935663004: Add checkbox for reporting invalid TLS/SSL cert chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment tweaks Created 5 years, 10 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
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 #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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698