OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_CONTROLL ER_CLIENT_H_ | |
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_CONTROLL ER_CLIENT_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "components/security_interstitials/core/controller_client.h" | |
10 | |
11 namespace content { | |
12 class InterstitialPage; | |
13 class WebContents; | |
14 } | |
15 | |
16 namespace security_interstitials { | |
17 | |
18 class MetricsHelper; | |
19 | |
20 // Handle commands from security interstitial pages. This class is instantiated | |
21 // by SafeBrowsingBlockingPage. | |
meacer
2016/12/27 23:22:34
Is the class really only instantiated by SafeBrows
Jialiu Lin
2016/12/28 18:30:00
Yes, SSLBlockingPage and CaptivePortalBlockingPage
meacer
2016/12/28 19:02:22
Sounds good. Can you add a comment or a todo sayin
Jialiu Lin
2016/12/28 19:40:32
Sure. Refined comments and added a todo.
| |
22 class SecurityInterstitialControllerClient | |
23 : public security_interstitials::ControllerClient { | |
24 public: | |
25 SecurityInterstitialControllerClient( | |
26 content::WebContents* web_contents, | |
27 std::unique_ptr<MetricsHelper> metrics_helper, | |
28 const GURL& default_safe_page); | |
meacer
2016/12/27 23:22:34
As I commented in chrome_controller_client.cc, loo
Jialiu Lin
2016/12/28 18:30:00
Done.
| |
29 | |
30 SecurityInterstitialControllerClient( | |
31 content::WebContents* web_contents, | |
32 std::unique_ptr<MetricsHelper> metrics_helper, | |
33 PrefService* prefs, | |
34 const std::string& app_locale, | |
35 const GURL& default_safe_page); | |
36 | |
37 ~SecurityInterstitialControllerClient() override; | |
38 | |
39 void set_interstitial_page(content::InterstitialPage* interstitial_page); | |
40 content::InterstitialPage* interstitial_page(); | |
41 | |
42 // security_interstitials::ControllerClient overrides | |
meacer
2016/12/27 23:22:34
nit: Missing dot or colon at the end of the line
Jialiu Lin
2016/12/28 18:30:00
Done.
| |
43 void GoBack() override; | |
44 void GoBackAfterNavigationCommitted() override; | |
45 void Proceed() override; | |
46 void Reload() override; | |
47 void OpenUrlInCurrentTab(const GURL& url) override; | |
48 PrefService* GetPrefService() override; | |
49 const std::string& GetApplicationLocale() override; | |
50 bool CanLaunchDateAndTimeSettings() override; | |
51 void LaunchDateAndTimeSettings() override; | |
52 | |
53 protected: | |
54 // security_interstitials::ControllerClient overrides | |
55 const std::string GetExtendedReportingPrefName() override; | |
meacer
2016/12/27 23:22:34
This could be a const method in security_interstit
meacer
2016/12/27 23:22:34
nit: Missing dot or colon at the end of the line
Jialiu Lin
2016/12/28 18:30:00
Done.
Jialiu Lin
2016/12/28 18:30:00
Done.
| |
56 content::WebContents* web_contents_; | |
57 | |
58 private: | |
59 content::InterstitialPage* interstitial_page_; | |
60 PrefService* prefs_; | |
61 const std::string app_locale_; | |
62 // The default safe page we should go to if there is no previous page to go | |
63 // back to, e.g. chrome:kChromeUINewTabURL. | |
64 const GURL& default_safe_page_; | |
meacer
2016/12/27 23:22:34
I think you can make this a non-reference member:
Jialiu Lin
2016/12/28 18:30:00
Done.
| |
65 | |
66 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialControllerClient); | |
67 }; | |
68 | |
69 } // namespace security_interstitials | |
70 | |
71 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_CONTR OLLER_CLIENT_H_ | |
OLD | NEW |