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

Side by Side Diff: chrome/browser/ssl/captive_portal_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 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 "chrome/browser/ssl/captive_portal_blocking_page.h" 5 #include "chrome/browser/ssl/captive_portal_blocking_page.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 case security_interstitials::CMD_TEXT_NOT_FOUND: 238 case security_interstitials::CMD_TEXT_NOT_FOUND:
239 // Commands are for testing. 239 // Commands are for testing.
240 break; 240 break;
241 default: 241 default:
242 NOTREACHED() << "Command " << cmd 242 NOTREACHED() << "Command " << cmd
243 << " isn't handled by the captive portal interstitial."; 243 << " isn't handled by the captive portal interstitial.";
244 } 244 }
245 } 245 }
246 246
247 void CaptivePortalBlockingPage::OverrideEntry(content::NavigationEntry* entry) { 247 void CaptivePortalBlockingPage::OverrideEntry(content::NavigationEntry* entry) {
248 entry->GetSSL() = content::SSLStatus( 248 entry->GetSSL() = content::SSLStatus(ssl_info_.cert, ssl_info_);
249 content::SECURITY_STYLE_AUTHENTICATION_BROKEN, ssl_info_.cert, ssl_info_);
250 } 249 }
251 250
252 void CaptivePortalBlockingPage::OnProceed() { 251 void CaptivePortalBlockingPage::OnProceed() {
253 NOTREACHED() 252 NOTREACHED()
254 << "Cannot proceed through the error on a captive portal interstitial."; 253 << "Cannot proceed through the error on a captive portal interstitial.";
255 } 254 }
256 255
257 void CaptivePortalBlockingPage::OnDontProceed() { 256 void CaptivePortalBlockingPage::OnDontProceed() {
258 if (cert_report_helper_) { 257 if (cert_report_helper_) {
259 // Finish collecting information about invalid certificates, if the 258 // Finish collecting information about invalid certificates, if the
260 // user opted in to. 259 // user opted in to.
261 cert_report_helper_->FinishCertCollection( 260 cert_report_helper_->FinishCertCollection(
262 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); 261 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED);
263 } 262 }
264 263
265 // Need to explicity deny the certificate via the callback, otherwise memory 264 // Need to explicity deny the certificate via the callback, otherwise memory
266 // is leaked. 265 // is leaked.
267 if (!callback_.is_null()) { 266 if (!callback_.is_null()) {
268 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); 267 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
269 callback_.Reset(); 268 callback_.Reset();
270 } 269 }
271 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/bad_clock_blocking_page.cc ('k') | chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698