| Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.h
|
| diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
|
| index 60a0280c3abaa44cd778f81d6bc71b7923eb7486..d24351dd04c4207ea40dae49bf44303bffef3561 100644
|
| --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
|
| +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
|
| @@ -36,30 +36,24 @@
|
| #include "base/task/cancelable_task_tracker.h"
|
| #include "base/time/time.h"
|
| #include "chrome/browser/history/history_service.h"
|
| +#include "chrome/browser/interstitials/security_interstitial_page.h"
|
| #include "chrome/browser/safe_browsing/ui_manager.h"
|
| -#include "content/public/browser/interstitial_page_delegate.h"
|
| #include "url/gurl.h"
|
|
|
| class MalwareDetails;
|
| class SafeBrowsingBlockingPageFactory;
|
|
|
| namespace base {
|
| -class DictionaryValue;
|
| class MessageLoop;
|
| }
|
|
|
| -namespace content {
|
| -class InterstitialPage;
|
| -class WebContents;
|
| -}
|
| -
|
| #if defined(ENABLE_EXTENSIONS)
|
| namespace extensions {
|
| class ExperienceSamplingEvent;
|
| }
|
| #endif
|
|
|
| -class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
|
| +class SafeBrowsingBlockingPage : public SecurityInterstitialPage {
|
| public:
|
| typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource;
|
| typedef std::vector<UnsafeResource> UnsafeResourceList;
|
| @@ -89,20 +83,19 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
|
| }
|
|
|
| // InterstitialPageDelegate method:
|
| - virtual std::string GetHTMLContents() OVERRIDE;
|
| virtual void OnProceed() OVERRIDE;
|
| virtual void OnDontProceed() OVERRIDE;
|
| virtual void CommandReceived(const std::string& command) OVERRIDE;
|
| virtual void OverrideRendererPrefs(
|
| content::RendererPreferences* prefs) OVERRIDE;
|
|
|
| + // SecurityInterstitialPage method:
|
| + virtual SecurityInterstitialPage::Type GetTypeForTesting() const OVERRIDE;
|
| +
|
| protected:
|
| friend class SafeBrowsingBlockingPageTest;
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
|
| ProceedThenDontProceed);
|
| -
|
| - void DontCreateViewForTesting();
|
| - void Show();
|
| void SetReportingPreference(bool report);
|
| void UpdateReportingPref(); // Used for the transition from old to new pref.
|
|
|
| @@ -111,14 +104,16 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
|
| content::WebContents* web_contents,
|
| const UnsafeResourceList& unsafe_resources);
|
|
|
| + // SecurityInterstitialPage methods:
|
| + virtual bool ShouldCreateNewNavigation() const OVERRIDE;
|
| + virtual void PopulateLoadTimeData(
|
| + base::DictionaryValue* load_time_data) OVERRIDE;
|
| +
|
| // After a malware interstitial where the user opted-in to the
|
| // report but clicked "proceed anyway", we delay the call to
|
| // MalwareDetails::FinishCollection() by this much time (in
|
| // milliseconds), in order to get data from the blocked resource itself.
|
| int64 malware_details_proceed_delay_ms_;
|
| - content::InterstitialPage* interstitial_page() const {
|
| - return interstitial_page_;
|
| - }
|
|
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
|
| MalwareReportsTransitionDisabled);
|
| @@ -206,13 +201,6 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
|
|
|
| bool proceeded_;
|
|
|
| - content::WebContents* web_contents_;
|
| - GURL url_;
|
| - content::InterstitialPage* interstitial_page_; // Owns us
|
| -
|
| - // Whether the interstitial should create a view.
|
| - bool create_view_;
|
| -
|
| // Which type of interstitial this is.
|
| enum {
|
| TYPE_MALWARE,
|
|
|