Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4885)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.h

Issue 330753002: Browser and unit tests for the SB interstitial V3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged redundancy Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 43ac464b57d8d2d4d8769e630e575e4fd5cf2d53..3b0cd090971829035b4cc0f8775c7a64df50859e 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
@@ -82,12 +82,11 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
virtual void OnDontProceed() OVERRIDE;
protected:
+ template <class TestSBInterstitialPage>
friend class SafeBrowsingBlockingPageTest;
+ template <class TestSBInterstitialPage>
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
ProceedThenDontProceed);
- friend class SafeBrowsingBlockingPageV2Test;
- FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageV2Test,
- ProceedThenDontProceed);
void SetReportingPreference(bool report);
@@ -105,8 +104,8 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
return interstitial_page_;
}
+ template <class TestSBInterstitialPage>
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, MalwareReports);
- FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageV2Test, MalwareReports);
enum BlockingPageEvent {
SHOW,
@@ -280,6 +279,24 @@ class SafeBrowsingBlockingPageV2 : public SafeBrowsingBlockingPage {
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageV2);
};
+class SafeBrowsingBlockingPageV3 : public SafeBrowsingBlockingPage {
+ public:
+ SafeBrowsingBlockingPageV3(SafeBrowsingUIManager* ui_manager,
+ content::WebContents* web_contents,
+ const UnsafeResourceList& unsafe_resources);
+
+ // InterstitialPageDelegate method:
+ virtual std::string GetHTMLContents() OVERRIDE;
+
+ private:
+ // Fills the passed dictionary with the values to be passed to the template
+ // when creating the HTML.
+ void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data);
+ void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data);
+
+ DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageV3);
+};
+
// Factory for creating SafeBrowsingBlockingPage. Useful for tests.
class SafeBrowsingBlockingPageFactory {
public:

Powered by Google App Engine
This is Rietveld 408576698