Commit caae7e41 authored by Carlos IL's avatar Carlos IL Committed by Commit Bot

Reland "Refactor SSLCertificateErrorPageController"

This reverts commit 30645e2f.

Reason for revert: Failures reproduce locally on commits prior to this CL.

Original change's description:
> Revert "Refactor SSLCertificateErrorPageController"
>
> This reverts commit 08c128cd.
>
> Reason for revert: Reverterd on suspicion of causing build failures on Mac 10.11
>
> TBR: carlosil@chromium.org
>
> failures:
> SSLClientSocketReadTest.Read/1
> SSLClientSocketReadTest.Read/0
> HTTPSEVCRLSetTest.FreshCRLSetNotCovered
> WebSocketEndToEndTest.BasicSmokeTest
> SSLClientSocketReadTest.DumpMemoryStats/0
> SSLClientSocketReadTest.DumpMemoryStats/1
> URLRequestTestFTP.FTPCheckWrongUser
> WebSocketEndToEndTest.TruncatedResponse
> WebSocketEndToEndTest.HstsWebSocketToWebSocket
> WebSocketEndToEndTest.TrailingWhitespace
> HTTPSOCSPTest.IntermediateResponseTooOld
> URLRequestTestFTP.FTPCheckWrongUserRestart
> URLRequestTestFTP.FTPCheckWrongPasswordRestart
> HTTPSOCSPTest.Revoked
> HTTPSFallbackTest.TLSv1_1NoFallback
> HTTPSFallbackTest.TLSv1_3Interference
> URLRequestTestFTP.FTPCheckWrongPassword
> WebSocketEndToEndTest.HeaderContinuations
> HTTPSCRLSetTest.ExpiredCRLSetAndRevoked
> HTTPSEVCRLSetTest.FreshCRLSetCovered
> SSLClientSocketReadTest.Read_DeleteWhilePendingFullDuplex/1
> SSLClientSocketReadTest.Read_DeleteWhilePendingFullDuplex/0
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/18
> HTTPSOCSPTest.Valid
> HTTPSEVCRLSetTest.ExpiredCRLSet
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/12
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/13
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/10
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/11
> OCSPVerify/HTTPSOCSPVerifyTest.VerifyResult/16
> … 70 more (100 total) …
>
> Original change's description:
> > Refactor SSLCertificateErrorPageController
> >
> > SSLCertificateErrorPageController is no longer only used on SSL errors,
> > renamed it to SecurityInterstitialErrorPageController, and removed the
> > net::Error code passed to EnablePageHelperFunctions since it's no
> > longer used.
> >
> > Bug: 910794
> > Change-Id: I718e0fcbcb2643cb0c47818dda1f317aef4e75cc
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503910
> > Reviewed-by: Matt Menke <mmenke@chromium.org>
> > Reviewed-by: Scott Violet <sky@chromium.org>
> > Commit-Queue: Carlos IL <carlosil@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#638232}
>
> TBR=sky@chromium.org,mmenke@chromium.org,carlosil@chromium.org
>
> Change-Id: I39489effa3e0029b5ff65f5bc9cbd991aef1ddea
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 910794
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1507039
> Reviewed-by: Peter Williamson <petewil@chromium.org>
> Commit-Queue: Peter Williamson <petewil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#638363}

TBR=sky@chromium.org,petewil@chromium.org,mmenke@chromium.org,carlosil@chromium.org

Change-Id: I5b9048e43ebc60964c44ebfd2c05207a22a549dc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 910794
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1509352Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
Commit-Queue: Carlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638773}
parent 2b37cc99
...@@ -102,8 +102,8 @@ jumbo_static_library("renderer") { ...@@ -102,8 +102,8 @@ jumbo_static_library("renderer") {
"sandbox_status_extension_android.h", "sandbox_status_extension_android.h",
"security_filter_peer.cc", "security_filter_peer.cc",
"security_filter_peer.h", "security_filter_peer.h",
"ssl/ssl_certificate_error_page_controller.cc", "security_interstitials/security_interstitial_page_controller.cc",
"ssl/ssl_certificate_error_page_controller.h", "security_interstitials/security_interstitial_page_controller.h",
"supervised_user/supervised_user_error_page_controller.cc", "supervised_user/supervised_user_error_page_controller.cc",
"supervised_user/supervised_user_error_page_controller.h", "supervised_user/supervised_user_error_page_controller.h",
"tts_dispatcher.cc", "tts_dispatcher.cc",
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h" #include "chrome/common/render_messages.h"
#include "chrome/renderer/chrome_render_thread_observer.h" #include "chrome/renderer/chrome_render_thread_observer.h"
#include "chrome/renderer/ssl/ssl_certificate_error_page_controller.h" #include "chrome/renderer/security_interstitials/security_interstitial_page_controller.h"
#include "chrome/renderer/supervised_user/supervised_user_error_page_controller.h" #include "chrome/renderer/supervised_user/supervised_user_error_page_controller.h"
#include "components/error_page/common/error.h" #include "components/error_page/common/error.h"
#include "components/error_page/common/error_page_params.h" #include "components/error_page/common/error_page_params.h"
...@@ -167,7 +167,7 @@ NetErrorHelper::NetErrorHelper(RenderFrame* render_frame) ...@@ -167,7 +167,7 @@ NetErrorHelper::NetErrorHelper(RenderFrame* render_frame)
: RenderFrameObserver(render_frame), : RenderFrameObserver(render_frame),
content::RenderFrameObserverTracker<NetErrorHelper>(render_frame), content::RenderFrameObserverTracker<NetErrorHelper>(render_frame),
weak_controller_delegate_factory_(this), weak_controller_delegate_factory_(this),
weak_ssl_error_controller_delegate_factory_(this), weak_security_interstitial_controller_delegate_factory_(this),
weak_supervised_user_error_controller_delegate_factory_(this) { weak_supervised_user_error_controller_delegate_factory_(this) {
RenderThread::Get()->AddObserver(this); RenderThread::Get()->AddObserver(this);
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
...@@ -324,7 +324,7 @@ void NetErrorHelper::DidCommitProvisionalLoad(bool is_same_document_navigation, ...@@ -324,7 +324,7 @@ void NetErrorHelper::DidCommitProvisionalLoad(bool is_same_document_navigation,
// error page, the controller has not yet been attached, so this won't affect // error page, the controller has not yet been attached, so this won't affect
// it. // it.
weak_controller_delegate_factory_.InvalidateWeakPtrs(); weak_controller_delegate_factory_.InvalidateWeakPtrs();
weak_ssl_error_controller_delegate_factory_.InvalidateWeakPtrs(); weak_security_interstitial_controller_delegate_factory_.InvalidateWeakPtrs();
weak_supervised_user_error_controller_delegate_factory_.InvalidateWeakPtrs(); weak_supervised_user_error_controller_delegate_factory_.InvalidateWeakPtrs();
core_->OnCommitLoad(GetFrameType(render_frame()), core_->OnCommitLoad(GetFrameType(render_frame()),
...@@ -433,9 +433,10 @@ void NetErrorHelper::LoadErrorPage(const std::string& html, ...@@ -433,9 +433,10 @@ void NetErrorHelper::LoadErrorPage(const std::string& html,
failed_url, true /* replace_current_item */); failed_url, true /* replace_current_item */);
} }
void NetErrorHelper::EnablePageHelperFunctions(net::Error net_error) { void NetErrorHelper::EnablePageHelperFunctions() {
SSLCertificateErrorPageController::Install( SecurityInterstitialPageController::Install(
render_frame(), weak_ssl_error_controller_delegate_factory_.GetWeakPtr()); render_frame(),
weak_security_interstitial_controller_delegate_factory_.GetWeakPtr());
NetErrorPageController::Install( NetErrorPageController::Install(
render_frame(), weak_controller_delegate_factory_.GetWeakPtr()); render_frame(), weak_controller_delegate_factory_.GetWeakPtr());
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "chrome/common/supervised_user_commands.mojom.h" #include "chrome/common/supervised_user_commands.mojom.h"
#include "chrome/renderer/net/net_error_helper_core.h" #include "chrome/renderer/net/net_error_helper_core.h"
#include "chrome/renderer/net/net_error_page_controller.h" #include "chrome/renderer/net/net_error_page_controller.h"
#include "chrome/renderer/ssl/ssl_certificate_error_page_controller.h" #include "chrome/renderer/security_interstitials/security_interstitial_page_controller.h"
#include "chrome/renderer/supervised_user/supervised_user_error_page_controller.h" #include "chrome/renderer/supervised_user/supervised_user_error_page_controller.h"
#include "chrome/renderer/supervised_user/supervised_user_error_page_controller_delegate.h" #include "chrome/renderer/supervised_user/supervised_user_error_page_controller_delegate.h"
#include "components/error_page/common/net_error_info.h" #include "components/error_page/common/net_error_info.h"
...@@ -55,7 +55,7 @@ class NetErrorHelper ...@@ -55,7 +55,7 @@ class NetErrorHelper
public content::RenderThreadObserver, public content::RenderThreadObserver,
public NetErrorHelperCore::Delegate, public NetErrorHelperCore::Delegate,
public NetErrorPageController::Delegate, public NetErrorPageController::Delegate,
public SSLCertificateErrorPageController::Delegate, public SecurityInterstitialPageController::Delegate,
public SupervisedUserErrorPageControllerDelegate, public SupervisedUserErrorPageControllerDelegate,
public chrome::mojom::NetworkDiagnosticsClient, public chrome::mojom::NetworkDiagnosticsClient,
public chrome::mojom::NavigationCorrector { public chrome::mojom::NavigationCorrector {
...@@ -75,7 +75,7 @@ class NetErrorHelper ...@@ -75,7 +75,7 @@ class NetErrorHelper
void UpdateEasterEggHighScore(int high_score) override; void UpdateEasterEggHighScore(int high_score) override;
void ResetEasterEggHighScore() override; void ResetEasterEggHighScore() override;
// SSLCertificateErrorPageController::Delegate implementation // SecurityInterstitialPageController::Delegate implementation
void SendCommand( void SendCommand(
security_interstitials::SecurityInterstitialCommand command) override; security_interstitials::SecurityInterstitialCommand command) override;
...@@ -130,7 +130,7 @@ class NetErrorHelper ...@@ -130,7 +130,7 @@ class NetErrorHelper
bool* auto_fetch_allowed, bool* auto_fetch_allowed,
std::string* html) const override; std::string* html) const override;
void LoadErrorPage(const std::string& html, const GURL& failed_url) override; void LoadErrorPage(const std::string& html, const GURL& failed_url) override;
void EnablePageHelperFunctions(net::Error net_error) override; void EnablePageHelperFunctions() override;
void UpdateErrorPage(const error_page::Error& error, void UpdateErrorPage(const error_page::Error& error,
bool is_failed_post, bool is_failed_post,
bool can_use_local_diagnostics_service) override; bool can_use_local_diagnostics_service) override;
...@@ -207,8 +207,8 @@ class NetErrorHelper ...@@ -207,8 +207,8 @@ class NetErrorHelper
base::WeakPtrFactory<NetErrorPageController::Delegate> base::WeakPtrFactory<NetErrorPageController::Delegate>
weak_controller_delegate_factory_; weak_controller_delegate_factory_;
base::WeakPtrFactory<SSLCertificateErrorPageController::Delegate> base::WeakPtrFactory<SecurityInterstitialPageController::Delegate>
weak_ssl_error_controller_delegate_factory_; weak_security_interstitial_controller_delegate_factory_;
base::WeakPtrFactory<SupervisedUserErrorPageControllerDelegate> base::WeakPtrFactory<SupervisedUserErrorPageControllerDelegate>
weak_supervised_user_error_controller_delegate_factory_; weak_supervised_user_error_controller_delegate_factory_;
......
...@@ -680,8 +680,7 @@ void NetErrorHelperCore::OnFinishLoad(FrameType frame_type) { ...@@ -680,8 +680,7 @@ void NetErrorHelperCore::OnFinishLoad(FrameType frame_type) {
delegate_->SetIsShowingDownloadButton( delegate_->SetIsShowingDownloadButton(
committed_error_page_info_->download_button_in_page); committed_error_page_info_->download_button_in_page);
delegate_->EnablePageHelperFunctions( delegate_->EnablePageHelperFunctions();
static_cast<net::Error>(committed_error_page_info_->error.reason()));
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
if (committed_error_page_info_->offline_content_feature_state == if (committed_error_page_info_->offline_content_feature_state ==
......
...@@ -80,7 +80,7 @@ class NetErrorHelperCore { ...@@ -80,7 +80,7 @@ class NetErrorHelperCore {
// Create extra Javascript bindings in the error page. Will only be invoked // Create extra Javascript bindings in the error page. Will only be invoked
// after an error page has finished loading. // after an error page has finished loading.
virtual void EnablePageHelperFunctions(net::Error net_error) = 0; virtual void EnablePageHelperFunctions() = 0;
// Updates the currently displayed error page with a new error code. The // Updates the currently displayed error page with a new error code. The
// currently displayed error page must have finished loading, and must have // currently displayed error page must have finished loading, and must have
......
...@@ -390,7 +390,7 @@ class NetErrorHelperCoreTest : public testing::Test, ...@@ -390,7 +390,7 @@ class NetErrorHelperCoreTest : public testing::Test,
last_error_html_ = html; last_error_html_ = html;
} }
void EnablePageHelperFunctions(net::Error net_error) override { void EnablePageHelperFunctions() override {
enable_page_helper_functions_count_++; enable_page_helper_functions_count_++;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/renderer/ssl/ssl_certificate_error_page_controller.h" #include "chrome/renderer/security_interstitials/security_interstitial_page_controller.h"
#include "components/security_interstitials/core/controller_client.h" #include "components/security_interstitials/core/controller_client.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
#include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame.h"
gin::WrapperInfo SSLCertificateErrorPageController::kWrapperInfo = { gin::WrapperInfo SecurityInterstitialPageController::kWrapperInfo = {
gin::kEmbedderNativeGin}; gin::kEmbedderNativeGin};
SSLCertificateErrorPageController::Delegate::~Delegate() {} SecurityInterstitialPageController::Delegate::~Delegate() {}
void SSLCertificateErrorPageController::Install( void SecurityInterstitialPageController::Install(
content::RenderFrame* render_frame, content::RenderFrame* render_frame,
base::WeakPtr<Delegate> delegate) { base::WeakPtr<Delegate> delegate) {
v8::Isolate* isolate = blink::MainThreadIsolate(); v8::Isolate* isolate = blink::MainThreadIsolate();
...@@ -28,8 +28,9 @@ void SSLCertificateErrorPageController::Install( ...@@ -28,8 +28,9 @@ void SSLCertificateErrorPageController::Install(
v8::Context::Scope context_scope(context); v8::Context::Scope context_scope(context);
gin::Handle<SSLCertificateErrorPageController> controller = gin::CreateHandle( gin::Handle<SecurityInterstitialPageController> controller =
isolate, new SSLCertificateErrorPageController(delegate)); gin::CreateHandle(isolate,
new SecurityInterstitialPageController(delegate));
if (controller.IsEmpty()) if (controller.IsEmpty())
return; return;
...@@ -38,76 +39,76 @@ void SSLCertificateErrorPageController::Install( ...@@ -38,76 +39,76 @@ void SSLCertificateErrorPageController::Install(
controller.ToV8()); controller.ToV8());
} }
SSLCertificateErrorPageController::SSLCertificateErrorPageController( SecurityInterstitialPageController::SecurityInterstitialPageController(
base::WeakPtr<Delegate> delegate) base::WeakPtr<Delegate> delegate)
: delegate_(delegate) {} : delegate_(delegate) {}
SSLCertificateErrorPageController::~SSLCertificateErrorPageController() {} SecurityInterstitialPageController::~SecurityInterstitialPageController() {}
void SSLCertificateErrorPageController::DontProceed() { void SecurityInterstitialPageController::DontProceed() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_DONT_PROCEED); security_interstitials::SecurityInterstitialCommand::CMD_DONT_PROCEED);
} }
void SSLCertificateErrorPageController::Proceed() { void SecurityInterstitialPageController::Proceed() {
SendCommand(security_interstitials::SecurityInterstitialCommand::CMD_PROCEED); SendCommand(security_interstitials::SecurityInterstitialCommand::CMD_PROCEED);
} }
void SSLCertificateErrorPageController::ShowMoreSection() { void SecurityInterstitialPageController::ShowMoreSection() {
SendCommand(security_interstitials::SecurityInterstitialCommand:: SendCommand(security_interstitials::SecurityInterstitialCommand::
CMD_SHOW_MORE_SECTION); CMD_SHOW_MORE_SECTION);
} }
void SSLCertificateErrorPageController::OpenHelpCenter() { void SecurityInterstitialPageController::OpenHelpCenter() {
SendCommand(security_interstitials::SecurityInterstitialCommand:: SendCommand(security_interstitials::SecurityInterstitialCommand::
CMD_OPEN_HELP_CENTER); CMD_OPEN_HELP_CENTER);
} }
void SSLCertificateErrorPageController::OpenDiagnostic() { void SecurityInterstitialPageController::OpenDiagnostic() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_OPEN_DIAGNOSTIC); security_interstitials::SecurityInterstitialCommand::CMD_OPEN_DIAGNOSTIC);
} }
void SSLCertificateErrorPageController::Reload() { void SecurityInterstitialPageController::Reload() {
SendCommand(security_interstitials::SecurityInterstitialCommand::CMD_RELOAD); SendCommand(security_interstitials::SecurityInterstitialCommand::CMD_RELOAD);
} }
void SSLCertificateErrorPageController::OpenDateSettings() { void SecurityInterstitialPageController::OpenDateSettings() {
SendCommand(security_interstitials::SecurityInterstitialCommand:: SendCommand(security_interstitials::SecurityInterstitialCommand::
CMD_OPEN_DATE_SETTINGS); CMD_OPEN_DATE_SETTINGS);
} }
void SSLCertificateErrorPageController::OpenLogin() { void SecurityInterstitialPageController::OpenLogin() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_OPEN_LOGIN); security_interstitials::SecurityInterstitialCommand::CMD_OPEN_LOGIN);
} }
void SSLCertificateErrorPageController::DoReport() { void SecurityInterstitialPageController::DoReport() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_DO_REPORT); security_interstitials::SecurityInterstitialCommand::CMD_DO_REPORT);
} }
void SSLCertificateErrorPageController::DontReport() { void SecurityInterstitialPageController::DontReport() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_DONT_REPORT); security_interstitials::SecurityInterstitialCommand::CMD_DONT_REPORT);
} }
void SSLCertificateErrorPageController::OpenReportingPrivacy() { void SecurityInterstitialPageController::OpenReportingPrivacy() {
SendCommand(security_interstitials::SecurityInterstitialCommand:: SendCommand(security_interstitials::SecurityInterstitialCommand::
CMD_OPEN_REPORTING_PRIVACY); CMD_OPEN_REPORTING_PRIVACY);
} }
void SSLCertificateErrorPageController::OpenWhitepaper() { void SecurityInterstitialPageController::OpenWhitepaper() {
SendCommand( SendCommand(
security_interstitials::SecurityInterstitialCommand::CMD_OPEN_WHITEPAPER); security_interstitials::SecurityInterstitialCommand::CMD_OPEN_WHITEPAPER);
} }
void SSLCertificateErrorPageController::ReportPhishingError() { void SecurityInterstitialPageController::ReportPhishingError() {
SendCommand(security_interstitials::SecurityInterstitialCommand:: SendCommand(security_interstitials::SecurityInterstitialCommand::
CMD_REPORT_PHISHING_ERROR); CMD_REPORT_PHISHING_ERROR);
} }
void SSLCertificateErrorPageController::SendCommand( void SecurityInterstitialPageController::SendCommand(
security_interstitials::SecurityInterstitialCommand command) { security_interstitials::SecurityInterstitialCommand command) {
if (delegate_) { if (delegate_) {
delegate_->SendCommand(command); delegate_->SendCommand(command);
...@@ -115,30 +116,31 @@ void SSLCertificateErrorPageController::SendCommand( ...@@ -115,30 +116,31 @@ void SSLCertificateErrorPageController::SendCommand(
} }
gin::ObjectTemplateBuilder gin::ObjectTemplateBuilder
SSLCertificateErrorPageController::GetObjectTemplateBuilder( SecurityInterstitialPageController::GetObjectTemplateBuilder(
v8::Isolate* isolate) { v8::Isolate* isolate) {
return gin::Wrappable<SSLCertificateErrorPageController>:: return gin::Wrappable<SecurityInterstitialPageController>::
GetObjectTemplateBuilder(isolate) GetObjectTemplateBuilder(isolate)
.SetMethod("dontProceed", .SetMethod("dontProceed",
&SSLCertificateErrorPageController::DontProceed) &SecurityInterstitialPageController::DontProceed)
.SetMethod("proceed", &SSLCertificateErrorPageController::Proceed) .SetMethod("proceed", &SecurityInterstitialPageController::Proceed)
.SetMethod("showMoreSection", .SetMethod("showMoreSection",
&SSLCertificateErrorPageController::ShowMoreSection) &SecurityInterstitialPageController::ShowMoreSection)
.SetMethod("openHelpCenter", .SetMethod("openHelpCenter",
&SSLCertificateErrorPageController::OpenHelpCenter) &SecurityInterstitialPageController::OpenHelpCenter)
.SetMethod("openDiagnostic", .SetMethod("openDiagnostic",
&SSLCertificateErrorPageController::OpenDiagnostic) &SecurityInterstitialPageController::OpenDiagnostic)
.SetMethod("reload", &SSLCertificateErrorPageController::Reload) .SetMethod("reload", &SecurityInterstitialPageController::Reload)
.SetMethod("openDateSettings", .SetMethod("openDateSettings",
&SSLCertificateErrorPageController::OpenDateSettings) &SecurityInterstitialPageController::OpenDateSettings)
.SetMethod("openLogin", &SSLCertificateErrorPageController::OpenLogin) .SetMethod("openLogin",
.SetMethod("doReport", &SSLCertificateErrorPageController::DoReport) &SecurityInterstitialPageController::OpenLogin)
.SetMethod("doReport", &SecurityInterstitialPageController::DoReport)
.SetMethod("dontReport", .SetMethod("dontReport",
&SSLCertificateErrorPageController::DontReport) &SecurityInterstitialPageController::DontReport)
.SetMethod("openReportingPrivacy", .SetMethod("openReportingPrivacy",
&SSLCertificateErrorPageController::OpenReportingPrivacy) &SecurityInterstitialPageController::OpenReportingPrivacy)
.SetMethod("openWhitepaper", .SetMethod("openWhitepaper",
&SSLCertificateErrorPageController::OpenWhitepaper) &SecurityInterstitialPageController::OpenWhitepaper)
.SetMethod("reportPhishingError", .SetMethod("reportPhishingError",
&SSLCertificateErrorPageController::ReportPhishingError); &SecurityInterstitialPageController::ReportPhishingError);
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_RENDERER_SSL_SSL_CERTIFICATE_ERROR_PAGE_CONTROLLER_H_ #ifndef CHROME_RENDERER_SECURITY_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_CONTROLLER_H_
#define CHROME_RENDERER_SSL_SSL_CERTIFICATE_ERROR_PAGE_CONTROLLER_H_ #define CHROME_RENDERER_SECURITY_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_CONTROLLER_H_
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "components/security_interstitials/core/controller_client.h" #include "components/security_interstitials/core/controller_client.h"
...@@ -16,8 +16,8 @@ class RenderFrame; ...@@ -16,8 +16,8 @@ class RenderFrame;
// This class makes various helper functions available to interstitials // This class makes various helper functions available to interstitials
// when committed interstitials are on. It is bound to the JavaScript // when committed interstitials are on. It is bound to the JavaScript
// window.certificateErrorPageController object. // window.certificateErrorPageController object.
class SSLCertificateErrorPageController class SecurityInterstitialPageController
: public gin::Wrappable<SSLCertificateErrorPageController> { : public gin::Wrappable<SecurityInterstitialPageController> {
public: public:
static gin::WrapperInfo kWrapperInfo; static gin::WrapperInfo kWrapperInfo;
...@@ -40,8 +40,8 @@ class SSLCertificateErrorPageController ...@@ -40,8 +40,8 @@ class SSLCertificateErrorPageController
base::WeakPtr<Delegate> delegate); base::WeakPtr<Delegate> delegate);
private: private:
explicit SSLCertificateErrorPageController(base::WeakPtr<Delegate> delegate); explicit SecurityInterstitialPageController(base::WeakPtr<Delegate> delegate);
~SSLCertificateErrorPageController() override; ~SecurityInterstitialPageController() override;
void DontProceed(); void DontProceed();
void Proceed(); void Proceed();
...@@ -65,7 +65,7 @@ class SSLCertificateErrorPageController ...@@ -65,7 +65,7 @@ class SSLCertificateErrorPageController
base::WeakPtr<Delegate> const delegate_; base::WeakPtr<Delegate> const delegate_;
DISALLOW_COPY_AND_ASSIGN(SSLCertificateErrorPageController); DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPageController);
}; };
#endif // CHROME_RENDERER_SSL_SSL_CERTIFICATE_ERROR_PAGE_CONTROLLER_H_ #endif // CHROME_RENDERER_SECURITY_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_CONTROLLER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment