| Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.h
|
| ===================================================================
|
| --- chrome/browser/safe_browsing/safe_browsing_blocking_page.h (revision 120576)
|
| +++ chrome/browser/safe_browsing/safe_browsing_blocking_page.h (working copy)
|
| @@ -33,19 +33,23 @@
|
| #include <vector>
|
|
|
| #include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| -#include "chrome/browser/tab_contents/chrome_interstitial_page.h"
|
| +#include "content/public/browser/interstitial_page_delegate.h"
|
| #include "googleurl/src/gurl.h"
|
|
|
| +class InterstitialPage;
|
| +class MalwareDetails;
|
| class MessageLoop;
|
| class SafeBrowsingBlockingPageFactory;
|
| -class MalwareDetails;
|
| -class TabContents;
|
|
|
| namespace base {
|
| class DictionaryValue;
|
| }
|
|
|
| -class SafeBrowsingBlockingPage : public ChromeInterstitialPage {
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| +class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
|
| public:
|
| typedef std::vector<SafeBrowsingService::UnsafeResource> UnsafeResourceList;
|
| typedef std::map<content::WebContents*, UnsafeResourceList> UnsafeResourceMap;
|
| @@ -67,17 +71,20 @@
|
| factory_ = factory;
|
| }
|
|
|
| - // ChromeInterstitialPage method:
|
| + // InterstitialPageDelegate method:
|
| virtual std::string GetHTMLContents() OVERRIDE;
|
| - virtual void Proceed() OVERRIDE;
|
| - virtual void DontProceed() OVERRIDE;
|
| + virtual void CommandReceived(const std::string& command) OVERRIDE;
|
| + virtual void OverrideRendererPrefs(
|
| + content::RendererPreferences* prefs) OVERRIDE;
|
| + virtual void OnProceed() OVERRIDE;
|
| + virtual void OnDontProceed() OVERRIDE;
|
|
|
| protected:
|
| friend class SafeBrowsingBlockingPageTest;
|
| + friend class TestSafeBrowsingBlockingPage;
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
|
| + ProceedThenDontProceed);
|
|
|
| - // ChromeInterstitialPage method:
|
| - virtual void CommandReceived(const std::string& command) OVERRIDE;
|
| -
|
| void SetReportingPreference(bool report);
|
|
|
| // Don't instanciate this class directly, use ShowBlockingPage instead.
|
| @@ -169,6 +176,12 @@
|
| // is gone (if the user enables the feature).
|
| scoped_refptr<MalwareDetails> malware_details_;
|
|
|
| + bool proceeded_;
|
| +
|
| + content::WebContents* web_contents_;
|
| + GURL url_;
|
| + InterstitialPage* interstitial_page_; // Owns us
|
| +
|
| // The factory used to instanciate SafeBrowsingBlockingPage objects.
|
| // Usefull for tests, so they can provide their own implementation of
|
| // SafeBrowsingBlockingPage.
|
|
|