[SSL] Componentize MITMSoftwareBlockingPage
All //chrome-level dependencies have been cleaned in a preceding CL.
Bug: 1030692
Change-Id: Ice24a7c19661f54d9b1fd081cc88a0c0237cc0e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992070
Reviewed-by: Carlos IL <[email protected]>
Commit-Queue: Colin Blundell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#731283}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 67db8b1e47..553c2b2 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1709,8 +1709,6 @@
"ssl/insecure_sensitive_input_driver_factory.h",
"ssl/known_interception_disclosure_infobar_delegate.cc",
"ssl/known_interception_disclosure_infobar_delegate.h",
- "ssl/mitm_software_blocking_page.cc",
- "ssl/mitm_software_blocking_page.h",
"ssl/secure_origin_policy_handler.cc",
"ssl/secure_origin_policy_handler.h",
"ssl/secure_origin_prefs_observer.cc",
diff --git a/chrome/browser/ssl/chrome_security_blocking_page_factory.h b/chrome/browser/ssl/chrome_security_blocking_page_factory.h
index 4a5ac16..6fec88e 100644
--- a/chrome/browser/ssl/chrome_security_blocking_page_factory.h
+++ b/chrome/browser/ssl/chrome_security_blocking_page_factory.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_SSL_CHROME_SECURITY_BLOCKING_PAGE_FACTORY_H_
#include "base/macros.h"
-#include "chrome/browser/ssl/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/bad_clock_blocking_page.h"
#include "components/security_interstitials/content/captive_portal_blocking_page.h"
+#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/content/ssl_blocking_page_base.h"
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc
index 04c4576..a52a2de 100644
--- a/chrome/browser/ssl/ssl_browsertest.cc
+++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -56,7 +56,6 @@
#include "chrome/browser/ssl/certificate_reporting_test_utils.h"
#include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
#include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
-#include "chrome/browser/ssl/mitm_software_blocking_page.h"
#include "chrome/browser/ssl/security_state_tab_helper.h"
#include "chrome/browser/ssl/ssl_browsertest_util.h"
#include "chrome/browser/ssl/ssl_error_assistant.h"
@@ -95,6 +94,7 @@
#include "components/security_interstitials/content/captive_portal_blocking_page.h"
#include "components/security_interstitials/content/cert_report_helper.h"
#include "components/security_interstitials/content/common_name_mismatch_handler.h"
+#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/content/security_interstitial_tab_helper.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc
index 8cab1ac..9e3d3391 100644
--- a/chrome/browser/ssl/ssl_error_handler.cc
+++ b/chrome/browser/ssl/ssl_error_handler.cc
@@ -29,7 +29,6 @@
#include "chrome/browser/ssl/blocked_interception_blocking_page.h"
#include "chrome/browser/ssl/captive_portal_helper.h"
#include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
-#include "chrome/browser/ssl/mitm_software_blocking_page.h"
#include "chrome/browser/ssl/ssl_error_assistant.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/pref_names.h"
@@ -37,6 +36,7 @@
#include "components/prefs/pref_service.h"
#include "components/security_interstitials/content/bad_clock_blocking_page.h"
#include "components/security_interstitials/content/captive_portal_blocking_page.h"
+#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/security_interstitial_page.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/content/ssl_cert_reporter.h"
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
index 87fa664..3c3e749 100644
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -21,12 +21,12 @@
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/browser/ssl/blocked_interception_blocking_page.h"
#include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
-#include "chrome/browser/ssl/mitm_software_blocking_page.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/url_constants.h"
#include "components/grit/dev_ui_components_resources.h"
#include "components/safe_browsing/core/db/database_manager.h"
#include "components/security_interstitials/content/bad_clock_blocking_page.h"
+#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/origin_policy_ui.h"
#include "components/security_interstitials/core/ssl_error_options_mask.h"
#include "components/security_interstitials/core/ssl_error_ui.h"
diff --git a/components/security_interstitials/content/BUILD.gn b/components/security_interstitials/content/BUILD.gn
index f349c31..2c330c4 100644
--- a/components/security_interstitials/content/BUILD.gn
+++ b/components/security_interstitials/content/BUILD.gn
@@ -19,6 +19,8 @@
"connection_help_ui.h",
"known_interception_disclosure_ui.cc",
"known_interception_disclosure_ui.h",
+ "mitm_software_blocking_page.cc",
+ "mitm_software_blocking_page.h",
"origin_policy_interstitial_page.cc",
"origin_policy_interstitial_page.h",
"origin_policy_ui.cc",
diff --git a/chrome/browser/ssl/mitm_software_blocking_page.cc b/components/security_interstitials/content/mitm_software_blocking_page.cc
similarity index 97%
rename from chrome/browser/ssl/mitm_software_blocking_page.cc
rename to components/security_interstitials/content/mitm_software_blocking_page.cc
index e533824..035fdd1c 100644
--- a/chrome/browser/ssl/mitm_software_blocking_page.cc
+++ b/components/security_interstitials/content/mitm_software_blocking_page.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ssl/mitm_software_blocking_page.h"
+#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include <utility>
@@ -25,9 +25,7 @@
using content::NavigationController;
using content::NavigationEntry;
-namespace {
-
-} // namespace
+namespace {} // namespace
// static
const InterstitialPageDelegate::TypeID
diff --git a/chrome/browser/ssl/mitm_software_blocking_page.h b/components/security_interstitials/content/mitm_software_blocking_page.h
similarity index 90%
rename from chrome/browser/ssl/mitm_software_blocking_page.h
rename to components/security_interstitials/content/mitm_software_blocking_page.h
index 5798d469..89b0146 100644
--- a/chrome/browser/ssl/mitm_software_blocking_page.h
+++ b/components/security_interstitials/content/mitm_software_blocking_page.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SSL_MITM_SOFTWARE_BLOCKING_PAGE_H_
-#define CHROME_BROWSER_SSL_MITM_SOFTWARE_BLOCKING_PAGE_H_
+#ifndef COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_MITM_SOFTWARE_BLOCKING_PAGE_H_
+#define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_MITM_SOFTWARE_BLOCKING_PAGE_H_
#include <memory>
#include <string>
@@ -68,4 +68,4 @@
DISALLOW_COPY_AND_ASSIGN(MITMSoftwareBlockingPage);
};
-#endif // CHROME_BROWSER_SSL_MITM_SOFTWARE_BLOCKING_PAGE_H_
+#endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_MITM_SOFTWARE_BLOCKING_PAGE_H_