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

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

Issue 1772143002: Use network time for bad clock interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estark review 4 Created 4 years, 9 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 (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 #include "chrome/browser/ssl/ssl_blocking_page.h" 5 #include "chrome/browser/ssl/ssl_blocking_page.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 new ChromeMetricsHelper(web_contents, request_url, reporting_info, 148 new ChromeMetricsHelper(web_contents, request_url, reporting_info,
149 GetSamplingEventName(overridable_, cert_error)); 149 GetSamplingEventName(overridable_, cert_error));
150 chrome_metrics_helper->StartRecordingCaptivePortalMetrics(overridable_); 150 chrome_metrics_helper->StartRecordingCaptivePortalMetrics(overridable_);
151 controller_->set_metrics_helper(make_scoped_ptr(chrome_metrics_helper)); 151 controller_->set_metrics_helper(make_scoped_ptr(chrome_metrics_helper));
152 152
153 cert_report_helper_.reset(new CertReportHelper( 153 cert_report_helper_.reset(new CertReportHelper(
154 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, 154 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info,
155 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, overridable_, 155 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, overridable_,
156 controller_->metrics_helper())); 156 controller_->metrics_helper()));
157 157
158 ssl_error_ui_.reset(new SSLErrorUI(request_url, cert_error, ssl_info, 158 ssl_error_ui_.reset(new SSLErrorUI(
159 options_mask, time_triggered, languages, 159 request_url, cert_error, ssl_info, options_mask, time_triggered,
160 controller_.get())); 160 g_browser_process->network_time_tracker(), languages, controller_.get()));
161 161
162 // Creating an interstitial without showing (e.g. from chrome://interstitials) 162 // Creating an interstitial without showing (e.g. from chrome://interstitials)
163 // it leaks memory, so don't create it here. 163 // it leaks memory, so don't create it here.
164 } 164 }
165 165
166 bool SSLBlockingPage::ShouldCreateNewNavigation() const { 166 bool SSLBlockingPage::ShouldCreateNewNavigation() const {
167 return true; 167 return true;
168 } 168 }
169 169
170 InterstitialPageDelegate::TypeID SSLBlockingPage::GetTypeForTesting() const { 170 InterstitialPageDelegate::TypeID SSLBlockingPage::GetTypeForTesting() const {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 // static 278 // static
279 bool SSLBlockingPage::IsOverridable(int options_mask, 279 bool SSLBlockingPage::IsOverridable(int options_mask,
280 const Profile* const profile) { 280 const Profile* const profile) {
281 const bool is_overridable = 281 const bool is_overridable =
282 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && 282 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) &&
283 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && 283 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) &&
284 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); 284 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed);
285 return is_overridable; 285 return is_overridable;
286 } 286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698