| Index: chrome/browser/interstitials/security_interstitial_page.h
|
| diff --git a/chrome/browser/interstitials/security_interstitial_page.h b/chrome/browser/interstitials/security_interstitial_page.h
|
| index 13c547df6856bdd94876345d9bef74c8b600436f..215253ebe96a5d24a8265032238642180429ab4e 100644
|
| --- a/chrome/browser/interstitials/security_interstitial_page.h
|
| +++ b/chrome/browser/interstitials/security_interstitial_page.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_
|
|
|
| #include "base/strings/string16.h"
|
| +#include "components/security_interstitials/core/controller_client.h"
|
| #include "content/public/browser/interstitial_page_delegate.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -26,39 +27,10 @@ extern const char kOptInLink[];
|
| extern const char kPrivacyLinkHtml[];
|
| }
|
|
|
| -namespace security_interstitials {
|
| -class MetricsHelper;
|
| -}
|
| -
|
| -class SecurityInterstitialPage : public content::InterstitialPageDelegate {
|
| +class SecurityInterstitialPage
|
| + : public content::InterstitialPageDelegate,
|
| + public security_interstitials::ControllerClient {
|
| public:
|
| - // These represent the commands sent from the interstitial JavaScript.
|
| - // DO NOT reorder or change these without also changing the JavaScript!
|
| - // See chrome/browser/resources/security_warnings/interstitial_v2.js
|
| - enum SecurityInterstitialCommands {
|
| - // Used by tests
|
| - CMD_ERROR = -3,
|
| - CMD_TEXT_FOUND = -2,
|
| - CMD_TEXT_NOT_FOUND = -1,
|
| - // Decisions
|
| - CMD_DONT_PROCEED = 0,
|
| - CMD_PROCEED = 1,
|
| - // Ways for user to get more information
|
| - CMD_SHOW_MORE_SECTION = 2,
|
| - CMD_OPEN_HELP_CENTER = 3,
|
| - CMD_OPEN_DIAGNOSTIC = 4,
|
| - // Primary button actions
|
| - CMD_RELOAD = 5,
|
| - CMD_OPEN_DATE_SETTINGS = 6,
|
| - CMD_OPEN_LOGIN = 7,
|
| - // Safe Browsing Extended Reporting
|
| - CMD_DO_REPORT = 8,
|
| - CMD_DONT_REPORT = 9,
|
| - CMD_OPEN_REPORTING_PRIVACY = 10,
|
| - // Report a phishing error
|
| - CMD_REPORT_PHISHING_ERROR = 11,
|
| - };
|
| -
|
| SecurityInterstitialPage(content::WebContents* web_contents,
|
| const GURL& url);
|
| ~SecurityInterstitialPage() override;
|
| @@ -87,22 +59,18 @@ class SecurityInterstitialPage : public content::InterstitialPageDelegate {
|
| content::WebContents* web_contents() const;
|
| GURL request_url() const;
|
|
|
| - // Record the user's preference for reporting information about
|
| - // malware and SSL errors.
|
| - void SetReportingPreference(bool report);
|
| -
|
| // Returns the boolean value of the given |pref| from the PrefService of the
|
| // Profile associated with |web_contents_|.
|
| bool IsPrefEnabled(const char* pref);
|
|
|
| - void OpenExtendedReportingPrivacyPolicy();
|
| -
|
| - security_interstitials::MetricsHelper* metrics_helper() const;
|
| - void set_metrics_helper(
|
| - scoped_ptr<security_interstitials::MetricsHelper> metrics_helper);
|
| + protected:
|
| + // security_interstitials::ControllerClient overrides
|
| + void OpenUrlInCurrentTab(const GURL& url) override;
|
| + const std::string& GetApplicationLocale() override;
|
| + PrefService* GetPrefService() override;
|
| + const std::string GetExtendedReportingPrefName() override;
|
|
|
| private:
|
| - scoped_ptr<security_interstitials::MetricsHelper> metrics_helper_;
|
| // The WebContents with which this interstitial page is
|
| // associated. Not available in ~SecurityInterstitialPage, since it
|
| // can be destroyed before this class is destroyed.
|
|
|