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

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

Issue 2603433002: Move SecurityInterstitialPage into component (Closed)
Patch Set: missed some changes in rebase Created 3 years, 11 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const void* const CaptivePortalBlockingPage::kTypeForTesting = 70 const void* const CaptivePortalBlockingPage::kTypeForTesting =
71 &CaptivePortalBlockingPage::kTypeForTesting; 71 &CaptivePortalBlockingPage::kTypeForTesting;
72 72
73 CaptivePortalBlockingPage::CaptivePortalBlockingPage( 73 CaptivePortalBlockingPage::CaptivePortalBlockingPage(
74 content::WebContents* web_contents, 74 content::WebContents* web_contents,
75 const GURL& request_url, 75 const GURL& request_url,
76 const GURL& login_url, 76 const GURL& login_url,
77 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, 77 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
78 const net::SSLInfo& ssl_info, 78 const net::SSLInfo& ssl_info,
79 const base::Callback<void(content::CertificateRequestResultType)>& callback) 79 const base::Callback<void(content::CertificateRequestResultType)>& callback)
80 : SecurityInterstitialPage(web_contents, 80 : SecurityInterstitialPage(
81 request_url, 81 web_contents,
82 CreateMetricsHelper(web_contents, request_url)), 82 request_url,
83 base::MakeUnique<ChromeControllerClient>(
84 web_contents,
85 CreateMetricsHelper(web_contents, request_url))),
83 login_url_(login_url), 86 login_url_(login_url),
84 ssl_info_(ssl_info), 87 ssl_info_(ssl_info),
85 callback_(callback) { 88 callback_(callback) {
86 DCHECK(login_url_.is_valid()); 89 DCHECK(login_url_.is_valid());
87 90
88 if (ssl_cert_reporter) { 91 if (ssl_cert_reporter) {
89 cert_report_helper_.reset(new CertReportHelper( 92 cert_report_helper_.reset(new CertReportHelper(
90 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, 93 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info,
91 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false, 94 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false,
92 base::Time::Now(), nullptr)); 95 base::Time::Now(), nullptr));
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); 274 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED);
272 } 275 }
273 276
274 // Need to explicity deny the certificate via the callback, otherwise memory 277 // Need to explicity deny the certificate via the callback, otherwise memory
275 // is leaked. 278 // is leaked.
276 if (!callback_.is_null()) { 279 if (!callback_.is_null()) {
277 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); 280 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
278 callback_.Reset(); 281 callback_.Reset();
279 } 282 }
280 } 283 }
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