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

Unified Diff: chrome/browser/interstitials/security_interstitial_page.h

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: Jialiu comments Created 4 years, 3 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
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 f013d9640449298550651d3fa862f241d534bb02..802db9ba5691dce7313ae3a3674ce463091ca268 100644
--- a/chrome/browser/interstitials/security_interstitial_page.h
+++ b/chrome/browser/interstitials/security_interstitial_page.h
@@ -29,8 +29,10 @@ class ChromeControllerClient;
class SecurityInterstitialPage : public content::InterstitialPageDelegate {
public:
- SecurityInterstitialPage(content::WebContents* web_contents,
- const GURL& url);
+ SecurityInterstitialPage(
+ content::WebContents* web_contents,
+ const GURL& url,
+ std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper);
~SecurityInterstitialPage() override;
// Creates an interstitial and shows it.
@@ -65,15 +67,10 @@ class SecurityInterstitialPage : public content::InterstitialPageDelegate {
// Profile associated with |web_contents_|.
bool IsPrefEnabled(const char* pref);
- // TODO(felt): Remove these. They are temporary methods, used to pass along
- // calls to the |controller_| for subclasses that don't yet have their own
- // ChromeControllerClients. crbug.com/488673
- security_interstitials::MetricsHelper* metrics_helper();
- void set_metrics_helper(
- std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper);
-
ChromeControllerClient* controller();
+ security_interstitials::MetricsHelper* metrics_helper();
+
private:
// The WebContents with which this interstitial page is
// associated. Not available in ~SecurityInterstitialPage, since it
@@ -88,6 +85,8 @@ class SecurityInterstitialPage : public content::InterstitialPageDelegate {
// For subclasses that don't have their own ChromeControllerClients yet.
std::unique_ptr<ChromeControllerClient> controller_;
+ std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper_;
+
DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage);
};
« no previous file with comments | « chrome/browser/interstitials/chrome_controller_client.cc ('k') | chrome/browser/interstitials/security_interstitial_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698