summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authornoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 19:47:13 +0000
committernoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 19:47:13 +0000
commitfa685ffdc706738091a9243e12da2c89f2a01f0f (patch)
treee9635360daabc26604bbf842f9873c0ce12c19ac /chrome/browser/tab_contents
parentbd6e45ffd4f1c0e805e76a472b50f8f05e3e82e0 (diff)
downloadchromium_src-fa685ffdc706738091a9243e12da2c89f2a01f0f.zip
chromium_src-fa685ffdc706738091a9243e12da2c89f2a01f0f.tar.gz
chromium_src-fa685ffdc706738091a9243e12da2c89f2a01f0f.tar.bz2
Intergration of the client-side phishing detection.
If the client-side phishing detection classifies a page as phishing it will send back a ping to Google to verify whether or not the page is really phishing. If the server also classifies the site as phishing we may show a phishing interstitial if it is enabled. BUG= TEST= Review URL: http://codereview.chromium.org/6014003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc3
-rw-r--r--chrome/browser/tab_contents/tab_contents.h11
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 223668c..55d8c83 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -64,6 +64,7 @@
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/renderer_preferences_util.h"
+#include "chrome/browser/safe_browsing/client_side_detection_host.h"
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/interstitial_page.h"
@@ -412,6 +413,8 @@ void TabContents::AddObservers() {
desktop_notification_handler_.reset(
new DesktopNotificationHandlerForTC(this, GetRenderProcessHost()));
plugin_observer_.reset(new PluginObserver(this));
+ safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
+ this));
}
// static
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 87ae5ab..9c40213 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -59,6 +59,10 @@ class PrintPreviewMessageHandler;
class PrintViewManager;
}
+namespace safe_browsing {
+class ClientSideDetectionHost;
+}
+
class AutocompleteHistoryManager;
class AutoFillManager;
class BlockedContentContainer;
@@ -710,6 +714,10 @@ class TabContents : public PageNavigator,
}
AutoFillManager* autofill_manager() { return autofill_manager_.get(); }
+ safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() {
+ return safebrowsing_detection_host_.get();
+ }
+
protected:
// from RenderViewHostDelegate.
virtual bool OnMessageReceived(const IPC::Message& message);
@@ -1093,6 +1101,9 @@ class TabContents : public PageNavigator,
// Handles desktop notification IPCs.
scoped_ptr<DesktopNotificationHandlerForTC> desktop_notification_handler_;
+ // Handles IPCs related to SafeBrowsing client-side phishing detection.
+ scoped_ptr<safe_browsing::ClientSideDetectionHost>
+ safebrowsing_detection_host_;
// Data for loading state ----------------------------------------------------