| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H_ |
| 7 |
| 8 #include "components/safe_browsing/base_blocking_page.h" |
| 9 #include "components/safe_browsing/base_ui_manager.h" |
| 10 #include "components/security_interstitials/core/base_safe_browsing_error_ui.h" |
| 11 #include "components/security_interstitials/core/safe_browsing_quiet_error_ui.h" |
| 12 |
| 13 namespace security_interstitials { |
| 14 |
| 15 // This class is used in the testing of the quiet versions of the safe browsing |
| 16 // interstitials via the Chrome browser, as it is currently only implemented |
| 17 // by WebView. |
| 18 class TestSafeBrowsingBlockingPageQuiet |
| 19 : public safe_browsing::BaseBlockingPage { |
| 20 public: |
| 21 typedef security_interstitials::UnsafeResource UnsafeResource; |
| 22 |
| 23 ~TestSafeBrowsingBlockingPageQuiet() override; |
| 24 |
| 25 static TestSafeBrowsingBlockingPageQuiet* CreateBlockingPage( |
| 26 safe_browsing::BaseUIManager* ui_manager, |
| 27 content::WebContents* web_contents, |
| 28 const GURL& main_frame_url, |
| 29 const UnsafeResource& unsafe_resource, |
| 30 bool is_giant_webview); |
| 31 |
| 32 // std::unique_ptr<SafeBrowsingQuietErrorUI> sb_error_ui; |
| 33 std::string GetHTML(); |
| 34 |
| 35 protected: |
| 36 // Don't instantiate this class directly, use CreateBlockingPage instead. |
| 37 TestSafeBrowsingBlockingPageQuiet( |
| 38 safe_browsing::BaseUIManager* ui_manager, |
| 39 content::WebContents* web_contents, |
| 40 const GURL& main_frame_url, |
| 41 const UnsafeResourceList& unsafe_resources, |
| 42 const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options, |
| 43 bool is_giant_webview); |
| 44 |
| 45 private: |
| 46 security_interstitials::SafeBrowsingQuietErrorUI sb_error_ui_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(TestSafeBrowsingBlockingPageQuiet); |
| 49 }; |
| 50 |
| 51 } // namespace security_interstitials |
| 52 |
| 53 #endif // CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H
_ |
| OLD | NEW |