OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SECURITY_INTERSTITIAL_PAGE_H_ | 5 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "content/public/browser/interstitial_page_delegate.h" | 9 #include "content/public/browser/interstitial_page_delegate.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // InterstitialPageDelegate method: | 44 // InterstitialPageDelegate method: |
45 std::string GetHTMLContents() override; | 45 std::string GetHTMLContents() override; |
46 | 46 |
47 // Returns the formatted host name for the request url. | 47 // Returns the formatted host name for the request url. |
48 base::string16 GetFormattedHostName() const; | 48 base::string16 GetFormattedHostName() const; |
49 | 49 |
50 content::InterstitialPage* interstitial_page() const; | 50 content::InterstitialPage* interstitial_page() const; |
51 content::WebContents* web_contents() const; | 51 content::WebContents* web_contents() const; |
52 GURL request_url() const; | 52 GURL request_url() const; |
53 | 53 |
54 // Record the user's preference for reporting information about | |
55 // malware and SSL errors. | |
56 void SetReportingPreference(bool report); | |
57 | |
58 // Fills the passed dictionary with the values to be passed to the template | |
59 // when creating the HTML. | |
60 virtual void PopulateExtendedReportingOption( | |
61 base::DictionaryValue* load_time_data) = 0; | |
62 | |
63 // Returns the boolean value of the given |pref| from the PrefService of the | |
64 // Profile associated with |web_contents_|. | |
65 bool IsPrefEnabled(const char* pref); | |
66 | |
54 private: | 67 private: |
55 content::WebContents* web_contents_; | 68 content::WebContents* web_contents_; |
56 const GURL request_url_; | 69 const GURL request_url_; |
57 // Once shown, |interstitial_page| takes ownership of this | 70 // Once shown, |interstitial_page| takes ownership of this |
58 // SecurityInterstitialPage instance. | 71 // SecurityInterstitialPage instance. |
59 content::InterstitialPage* interstitial_page_; | 72 content::InterstitialPage* interstitial_page_; |
60 // Whether the interstitial should create a view. | 73 // Whether the interstitial should create a view. |
61 bool create_view_; | 74 bool create_view_; |
62 | 75 |
63 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 76 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
64 }; | 77 }; |
65 | 78 |
79 namespace interstitials { | |
felt
2015/02/24 01:57:53
nit: I feel like this should be above the class de
estark
2015/02/24 18:47:08
Done -- there are other |namespace {...}|s up ther
| |
80 // Constants used to communicate with the JavaScript. | |
81 extern const char kBoxChecked[]; | |
82 extern const char kDisplayCheckBox[]; | |
83 extern const char kPrivacyLinkHtml[]; | |
84 } | |
85 | |
66 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 86 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
OLD | NEW |