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

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

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)
Patch Set: more curly braces Created 4 years, 2 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 controller()->metrics_helper())); 208 controller()->metrics_helper()));
209 209
210 ssl_error_ui_.reset(new SSLErrorUI(request_url, cert_error, ssl_info, 210 ssl_error_ui_.reset(new SSLErrorUI(request_url, cert_error, ssl_info,
211 options_mask, time_triggered, 211 options_mask, time_triggered,
212 controller())); 212 controller()));
213 // Creating an interstitial without showing (e.g. from chrome://interstitials) 213 // Creating an interstitial without showing (e.g. from chrome://interstitials)
214 // it leaks memory, so don't create it here. 214 // it leaks memory, so don't create it here.
215 } 215 }
216 216
217 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { 217 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) {
218 entry->GetSSL() = content::SSLStatus( 218 entry->GetSSL() = content::SSLStatus(ssl_info_.cert, ssl_info_);
219 content::SECURITY_STYLE_AUTHENTICATION_BROKEN, ssl_info_.cert, ssl_info_);
220 } 219 }
221 220
222 void SSLBlockingPage::SetSSLCertReporterForTesting( 221 void SSLBlockingPage::SetSSLCertReporterForTesting(
223 std::unique_ptr<SSLCertReporter> ssl_cert_reporter) { 222 std::unique_ptr<SSLCertReporter> ssl_cert_reporter) {
224 cert_report_helper_->SetSSLCertReporterForTesting( 223 cert_report_helper_->SetSSLCertReporterForTesting(
225 std::move(ssl_cert_reporter)); 224 std::move(ssl_cert_reporter));
226 } 225 }
227 226
228 // This handles the commands sent from the interstitial JavaScript. 227 // This handles the commands sent from the interstitial JavaScript.
229 void SSLBlockingPage::CommandReceived(const std::string& command) { 228 void SSLBlockingPage::CommandReceived(const std::string& command) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 283
285 // static 284 // static
286 bool SSLBlockingPage::IsOverridable(int options_mask, 285 bool SSLBlockingPage::IsOverridable(int options_mask,
287 const Profile* const profile) { 286 const Profile* const profile) {
288 const bool is_overridable = 287 const bool is_overridable =
289 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && 288 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) &&
290 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && 289 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) &&
291 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); 290 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed);
292 return is_overridable; 291 return is_overridable;
293 } 292 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698