diff options
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_blocking_page.h')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_blocking_page.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h index 7e7cb22..cfe2358 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h @@ -39,10 +39,14 @@ class DictionaryValue; class MessageLoop; class SafeBrowsingBlockingPageFactory; +class MalwareDetails; class TabContents; class SafeBrowsingBlockingPage : public InterstitialPage { public: + typedef std::vector<SafeBrowsingService::UnsafeResource> UnsafeResourceList; + typedef std::map<TabContents*, UnsafeResourceList> UnsafeResourceMap; + virtual ~SafeBrowsingBlockingPage(); // Shows a blocking page warning the user about phishing/malware for a @@ -65,8 +69,6 @@ class SafeBrowsingBlockingPage : public InterstitialPage { virtual void Proceed(); virtual void DontProceed(); - typedef std::vector<SafeBrowsingService::UnsafeResource> UnsafeResourceList; - protected: friend class SafeBrowsingBlockingPageTest; @@ -104,10 +106,19 @@ class SafeBrowsingBlockingPage : public InterstitialPage { // SBInterstitial[Phishing|Malware|Multiple][Show|Proceed|DontProceed]. void RecordUserAction(BlockingPageEvent event); + // See if we should even show the malware details option. For example, we + // don't show it in incognito mode. + bool CanShowMalwareDetailsOption(); + + // Called when the insterstitial is going away. If there is a + // pending malware details object, we look at the user's + // preferences, and if the option to send malware details is + // enabled, the report is scheduled to be sent on the |sb_service_|. + void FinishMalwareDetails(); + // A list of SafeBrowsingService::UnsafeResource for a tab that the user // should be warned about. They are queued when displaying more than one // interstitial at a time. - typedef std::map<TabContents*, UnsafeResourceList> UnsafeResourceMap; static UnsafeResourceMap* GetUnsafeResourcesMap(); // Notifies the SafeBrowsingService on the IO thread whether to proceed or not @@ -136,6 +147,11 @@ class SafeBrowsingBlockingPage : public InterstitialPage { // The list of unsafe resources this page is warning about. UnsafeResourceList unsafe_resources_; + // A MalwareDetails object that we start generating when the + // blocking page is shown. The object will be sent when the warning + // is gone (if the user enables the feature). + scoped_refptr<MalwareDetails> malware_details_; + // The factory used to instanciate SafeBrowsingBlockingPage objects. // Usefull for tests, so they can provide their own implementation of // SafeBrowsingBlockingPage. |