summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordglazkov <dglazkov@chromium.org>2016-01-15 13:39:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-15 21:40:39 +0000
commit5afb10f3485f626a04aac9af869a5b38ed052071 (patch)
tree9f5a475d9d7209422cc878a6dc159f6fbed65373
parent9209832404f9506ce9924af2cf730bae8fb8e123 (diff)
downloadchromium_src-5afb10f3485f626a04aac9af869a5b38ed052071.zip
chromium_src-5afb10f3485f626a04aac9af869a5b38ed052071.tar.gz
chromium_src-5afb10f3485f626a04aac9af869a5b38ed052071.tar.bz2
Make ClientSideDetectionHost listen to RenderFrameHost messages.
In http://crrev.com/1325373002, the PhishingClassifierDelegate changed from being a RenderViewObserver to RenderFrameObserver. One distinction between the two is that they rely on different OnMessageReceived code paths for receivers of the messages that the observers send. The ClientSideDetectionHost was never changed to use the new path and thus stopped receiving the OnPhishingDetectionDone messsage. BUG=577970 Review URL: https://codereview.chromium.org/1588733009 Cr-Commit-Position: refs/heads/master@{#369848}
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc4
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 1fce269..f7cb750 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -340,7 +340,9 @@ ClientSideDetectionHost::~ClientSideDetectionHost() {
ui_manager_->RemoveObserver(this);
}
-bool ClientSideDetectionHost::OnMessageReceived(const IPC::Message& message) {
+bool ClientSideDetectionHost::OnMessageReceived(
+ const IPC::Message& message,
+ content::RenderFrameHost* render_frame_host) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ClientSideDetectionHost, message)
IPC_MESSAGE_HANDLER(SafeBrowsingHostMsg_PhishingDetectionDone,
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h
index 4bc7760..02b2767 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.h
+++ b/chrome/browser/safe_browsing/client_side_detection_host.h
@@ -38,7 +38,8 @@ class ClientSideDetectionHost : public content::WebContentsObserver,
~ClientSideDetectionHost() override;
// From content::WebContentsObserver.
- bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message,
+ content::RenderFrameHost* render_frame_host) override;
void DidGetResourceResponseStart(
const content::ResourceRequestDetails& details) override;