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

Side by Side Diff: chrome/browser/interstitials/chrome_controller_client.h

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: Jialiu comments Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/interstitials/chrome_controller_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_
6 #define CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_ 6 #define CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/security_interstitials/core/controller_client.h" 9 #include "components/security_interstitials/core/controller_client.h"
10 10
11 namespace content { 11 namespace content {
12 class InterstitialPage; 12 class InterstitialPage;
13 class WebContents; 13 class WebContents;
14 } 14 }
15 15
16 // Provides embedder-specific logic for the security error page controller. 16 // Provides embedder-specific logic for the security error page controller.
17 class ChromeControllerClient : public security_interstitials::ControllerClient { 17 class ChromeControllerClient : public security_interstitials::ControllerClient {
18 public: 18 public:
19 explicit ChromeControllerClient(content::WebContents* web_contents); 19 ChromeControllerClient(
20 content::WebContents* web_contents,
21 std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper);
20 ~ChromeControllerClient() override; 22 ~ChromeControllerClient() override;
21 23
22 void set_interstitial_page(content::InterstitialPage* interstitial_page); 24 void set_interstitial_page(content::InterstitialPage* interstitial_page);
23 25
24 // security_interstitials::ControllerClient overrides 26 // security_interstitials::ControllerClient overrides
25 bool CanLaunchDateAndTimeSettings() override; 27 bool CanLaunchDateAndTimeSettings() override;
26 void LaunchDateAndTimeSettings() override; 28 void LaunchDateAndTimeSettings() override;
27 void GoBack() override; 29 void GoBack() override;
28 void Proceed() override; 30 void Proceed() override;
29 void Reload() override; 31 void Reload() override;
30 void OpenUrlInCurrentTab(const GURL& url) override; 32 void OpenUrlInCurrentTab(const GURL& url) override;
31 33
32 protected: 34 protected:
33 // security_interstitials::ControllerClient overrides 35 // security_interstitials::ControllerClient overrides
34 const std::string& GetApplicationLocale() override; 36 const std::string& GetApplicationLocale() override;
35 PrefService* GetPrefService() override; 37 PrefService* GetPrefService() override;
36 const std::string GetExtendedReportingPrefName() override; 38 const std::string GetExtendedReportingPrefName() override;
37 39
38 private: 40 private:
39 content::WebContents* web_contents_; 41 content::WebContents* web_contents_;
40 content::InterstitialPage* interstitial_page_; 42 content::InterstitialPage* interstitial_page_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(ChromeControllerClient); 44 DISALLOW_COPY_AND_ASSIGN(ChromeControllerClient);
43 }; 45 };
44 46
45 #endif // CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_ 47 #endif // CHROME_BROWSER_INTERSTITIALS_CHROME_CONTROLLER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/interstitials/chrome_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698