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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 const GURL request_url_; | 56 const GURL request_url_; |
57 // Once shown, |interstitial_page| takes ownership of this | 57 // Once shown, |interstitial_page| takes ownership of this |
58 // SecurityInterstitialPage instance. | 58 // SecurityInterstitialPage instance. |
59 content::InterstitialPage* interstitial_page_; | 59 content::InterstitialPage* interstitial_page_; |
60 // Whether the interstitial should create a view. | 60 // Whether the interstitial should create a view. |
61 bool create_view_; | 61 bool create_view_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 63 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
64 }; | 64 }; |
65 | 65 |
66 class SecurityInterstitialPageWithExtendedReporting | |
67 : public SecurityInterstitialPage { | |
68 public: | |
69 SecurityInterstitialPageWithExtendedReporting( | |
70 content::WebContents* web_contents, | |
71 const GURL& url); | |
72 | |
73 protected: | |
74 // Record the user's preference for reporting information about | |
75 // malware and SSL errors. | |
76 void SetReportingPreference(bool report); | |
77 | |
78 // Fills the passed dictionary with the values to be passed to the template | |
79 // when creating the HTML. | |
80 virtual void PopulateExtendedReportingOption( | |
81 base::DictionaryValue* load_time_data) = 0; | |
82 | |
83 // Returns the boolean value of the given |pref| from the PrefService of the | |
84 // Profile associated with |web_contents_|. | |
85 bool IsPrefEnabled(const char* pref); | |
86 }; | |
87 | |
88 namespace { | |
felt
2015/02/18 04:16:29
hmm, I'm not sure that this belongs here. normally
estark
2015/02/18 05:22:44
Oh, ok, I see. Based on //url/url_constants.h, I l
| |
89 // Constants used to communicate with the JavaScript. | |
90 const char kBoxChecked[] = "boxchecked"; | |
91 const char kDisplayCheckBox[] = "displaycheckbox"; | |
92 const char kPrivacyLinkHtml[] = | |
93 "<a id=\"privacy-link\" href=\"\" onclick=\"sendCommand('showPrivacy'); " | |
94 "return false;\" onmousedown=\"return false;\">%s</a>"; | |
95 } | |
96 | |
66 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 97 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
OLD | NEW |