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

Side by Side Diff: ios/chrome/browser/interstitials/ios_chrome_controller_client.h

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: namespaces 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 unified diff | Download patch
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 IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_ 5 #ifndef IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_
6 #define IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_ 6 #define IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/security_interstitials/core/controller_client.h" 11 #include "components/security_interstitials/core/controller_client.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 namespace security_interstitials {
16 class MetricsHelper;
17 }
18
15 namespace web { 19 namespace web {
16 class WebInterstitial; 20 class WebInterstitial;
17 class WebState; 21 class WebState;
18 } 22 }
19 23
20 // Provides embedder-specific logic for the security error page controller. 24 // Provides embedder-specific logic for the security error page controller.
21 class IOSChromeControllerClient 25 class IOSChromeControllerClient
22 : public security_interstitials::ControllerClient { 26 : public security_interstitials::ControllerClient {
23 public: 27 public:
24 explicit IOSChromeControllerClient(web::WebState* web_state); 28 IOSChromeControllerClient(
29 web::WebState* web_state,
30 std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper);
25 ~IOSChromeControllerClient() override; 31 ~IOSChromeControllerClient() override;
26 32
27 void SetWebInterstitial(web::WebInterstitial* web_interstitial); 33 void SetWebInterstitial(web::WebInterstitial* web_interstitial);
28 34
29 private: 35 private:
30 // security_interstitials::ControllerClient implementation. 36 // security_interstitials::ControllerClient implementation.
31 bool CanLaunchDateAndTimeSettings() override; 37 bool CanLaunchDateAndTimeSettings() override;
32 void LaunchDateAndTimeSettings() override; 38 void LaunchDateAndTimeSettings() override;
33 void GoBack() override; 39 void GoBack() override;
34 void Proceed() override; 40 void Proceed() override;
35 void Reload() override; 41 void Reload() override;
36 void OpenUrlInCurrentTab(const GURL& url) override; 42 void OpenUrlInCurrentTab(const GURL& url) override;
37 const std::string& GetApplicationLocale() override; 43 const std::string& GetApplicationLocale() override;
38 PrefService* GetPrefService() override; 44 PrefService* GetPrefService() override;
39 const std::string GetExtendedReportingPrefName() override; 45 const std::string GetExtendedReportingPrefName() override;
40 46
41 web::WebState* web_state_; 47 web::WebState* web_state_;
42 web::WebInterstitial* web_interstitial_; 48 web::WebInterstitial* web_interstitial_;
43 49
44 DISALLOW_COPY_AND_ASSIGN(IOSChromeControllerClient); 50 DISALLOW_COPY_AND_ASSIGN(IOSChromeControllerClient);
45 }; 51 };
46 52
47 #endif // IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_ 53 #endif // IOS_CHROME_BROWSER_INTERSTITIALS_IOS_CHROME_CONTROLLER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698