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

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

Issue 2894243002: Add quiet safe browsing interstitials to chrome://interstitials for in browser testing (Closed)
Patch Set: Merge and fix display_options Created 3 years, 7 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h
diff --git a/chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h b/chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h
new file mode 100644
index 0000000000000000000000000000000000000000..dac8296487c571318a28f118a78535dc3964880b
--- /dev/null
+++ b/chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h
@@ -0,0 +1,53 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H_
+#define CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H_
+
+#include "components/safe_browsing/base_blocking_page.h"
+#include "components/safe_browsing/base_ui_manager.h"
+#include "components/security_interstitials/core/base_safe_browsing_error_ui.h"
+#include "components/security_interstitials/core/safe_browsing_quiet_error_ui.h"
+
+namespace security_interstitials {
+
+// This class is used in the testing of the quiet versions of the safe browsing
+// interstitials via the Chrome browser, as it is currently only implemented
+// by WebView.
+class TestSafeBrowsingBlockingPageQuiet
+ : public safe_browsing::BaseBlockingPage {
+ public:
+ typedef security_interstitials::UnsafeResource UnsafeResource;
+
+ ~TestSafeBrowsingBlockingPageQuiet() override;
+
+ static TestSafeBrowsingBlockingPageQuiet* CreateBlockingPage(
+ safe_browsing::BaseUIManager* ui_manager,
+ content::WebContents* web_contents,
+ const GURL& main_frame_url,
+ const UnsafeResource& unsafe_resource,
+ bool is_giant_webview);
+
+ // std::unique_ptr<SafeBrowsingQuietErrorUI> sb_error_ui;
+ std::string GetHTML();
+
+ protected:
+ // Don't instantiate this class directly, use CreateBlockingPage instead.
+ TestSafeBrowsingBlockingPageQuiet(
+ safe_browsing::BaseUIManager* ui_manager,
+ content::WebContents* web_contents,
+ const GURL& main_frame_url,
+ const UnsafeResourceList& unsafe_resources,
+ const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options,
+ bool is_giant_webview);
+
+ private:
+ security_interstitials::SafeBrowsingQuietErrorUI sb_error_ui_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestSafeBrowsingBlockingPageQuiet);
+};
+
+} // namespace security_interstitials
+
+#endif // CHROME_BROWSER_SAFE_BROWSING_TEST_SAFE_BROWSING_BLOCKING_PAGE_QUIET_H_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698