Chromium Code Reviews| 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 8eaa9ba8a8268d03469093f8c808b55cb0d5db58..5d775131d41cf008190f38606dc4a09d0ec8a4de 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h |
| +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h |
| @@ -76,6 +76,9 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate { |
| static void ShowBlockingPage( |
| SafeBrowsingUIManager* ui_manager, const UnsafeResource& resource); |
| + // InterstitialPageDelegate method: |
|
Dan Beam
2014/08/08 02:34:33
combine with other methods
felt
2014/08/08 02:37:38
Done, and reordered to be in same order as Interst
|
| + virtual std::string GetHTMLContents() OVERRIDE; |
| + |
| // Makes the passed |factory| the factory used to instantiate |
| // SafeBrowsingBlockingPage objects. Useful for tests. |
| static void RegisterFactory(SafeBrowsingBlockingPageFactory* factory) { |
| @@ -90,9 +93,7 @@ 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); |
| @@ -115,10 +116,8 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate { |
| return interstitial_page_; |
| } |
| - template <class TestSBInterstitialPage> |
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, |
| MalwareReportsTransitionDisabled); |
| - template <class TestSBInterstitialPage> |
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, |
| MalwareReportsToggling); |
| @@ -233,86 +232,13 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate { |
| int num_visits_; |
| base::CancelableTaskTracker request_tracker_; |
| - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); |
| -}; |
| - |
| -class SafeBrowsingBlockingPageV1 : public SafeBrowsingBlockingPage { |
| - public: |
| - // Don't instantiate this class directly, use ShowBlockingPage instead. |
| - SafeBrowsingBlockingPageV1(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 strings passed to JS Template when |
| - // creating the HTML. |
| - void PopulateMultipleThreatStringDictionary(base::DictionaryValue* strings); |
| - void PopulateMalwareStringDictionary(base::DictionaryValue* strings); |
| - void PopulatePhishingStringDictionary(base::DictionaryValue* strings); |
| - |
| - // A helper method used by the Populate methods above used to populate common |
| - // fields. |
| - void PopulateStringDictionary(base::DictionaryValue* strings, |
| - const base::string16& title, |
| - const base::string16& headline, |
| - const base::string16& description1, |
| - const base::string16& description2, |
| - const base::string16& description3); |
| - |
| - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageV1); |
| -}; |
| - |
| -class SafeBrowsingBlockingPageV2 : public SafeBrowsingBlockingPage { |
| - public: |
| - // Don't instantiate this class directly, use ShowBlockingPage instead. |
| - SafeBrowsingBlockingPageV2(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 strings passed to JS Template when |
| - // creating the HTML. |
| - void PopulateMultipleThreatStringDictionary(base::DictionaryValue* strings); |
| - void PopulateMalwareStringDictionary(base::DictionaryValue* strings); |
| - void PopulatePhishingStringDictionary(base::DictionaryValue* strings); |
| - |
| - // A helper method used by the Populate methods above used to populate common |
| - // fields. |
| - void PopulateStringDictionary(base::DictionaryValue* strings, |
| - const base::string16& title, |
| - const base::string16& headline, |
| - const base::string16& description1, |
| - const base::string16& description2, |
| - const base::string16& description3); |
| - |
| - 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); |
| - // For the M37 FieldTrial: this contains the name of the condition. |
| - std::string trial_condition_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageV3); |
| + DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); |
| }; |
| // Factory for creating SafeBrowsingBlockingPage. Useful for tests. |