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

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

Issue 2220603003: Remove unnecessary |result| argument from AllowCertificateError() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary include Created 4 years, 4 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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // static 48 // static
49 const void* const CaptivePortalBlockingPage::kTypeForTesting = 49 const void* const CaptivePortalBlockingPage::kTypeForTesting =
50 &CaptivePortalBlockingPage::kTypeForTesting; 50 &CaptivePortalBlockingPage::kTypeForTesting;
51 51
52 CaptivePortalBlockingPage::CaptivePortalBlockingPage( 52 CaptivePortalBlockingPage::CaptivePortalBlockingPage(
53 content::WebContents* web_contents, 53 content::WebContents* web_contents,
54 const GURL& request_url, 54 const GURL& request_url,
55 const GURL& login_url, 55 const GURL& login_url,
56 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, 56 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
57 const net::SSLInfo& ssl_info, 57 const net::SSLInfo& ssl_info,
58 const base::Callback<void(bool)>& callback) 58 const base::Callback<void(content::CertificateRequestResultType)>& callback)
59 : SecurityInterstitialPage(web_contents, request_url), 59 : SecurityInterstitialPage(web_contents, request_url),
60 login_url_(login_url), 60 login_url_(login_url),
61 callback_(callback) { 61 callback_(callback) {
62 DCHECK(login_url_.is_valid()); 62 DCHECK(login_url_.is_valid());
63 63
64 if (ssl_cert_reporter) { 64 if (ssl_cert_reporter) {
65 cert_report_helper_.reset(new CertReportHelper( 65 cert_report_helper_.reset(new CertReportHelper(
66 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, 66 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info,
67 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false, 67 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false,
68 nullptr)); 68 nullptr));
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (cert_report_helper_) { 213 if (cert_report_helper_) {
214 // Finish collecting information about invalid certificates, if the 214 // Finish collecting information about invalid certificates, if the
215 // user opted in to. 215 // user opted in to.
216 cert_report_helper_->FinishCertCollection( 216 cert_report_helper_->FinishCertCollection(
217 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); 217 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED);
218 } 218 }
219 219
220 // Need to explicity deny the certificate via the callback, otherwise memory 220 // Need to explicity deny the certificate via the callback, otherwise memory
221 // is leaked. 221 // is leaked.
222 if (!callback_.is_null()) { 222 if (!callback_.is_null()) {
223 callback_.Run(false); 223 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
224 callback_.Reset(); 224 callback_.Reset();
225 } 225 }
226 } 226 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/captive_portal_blocking_page.h ('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