OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ |
6 #define COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ | 6 #define COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 virtual void HandleSubresourcesAfterProceed(); | 110 virtual void HandleSubresourcesAfterProceed(); |
111 | 111 |
112 void SetThreatDetailsProceedDelayForTesting(int64_t delay); | 112 void SetThreatDetailsProceedDelayForTesting(int64_t delay); |
113 | 113 |
114 static std::unique_ptr< | 114 static std::unique_ptr< |
115 security_interstitials::SecurityInterstitialControllerClient> | 115 security_interstitials::SecurityInterstitialControllerClient> |
116 CreateControllerClient(content::WebContents* web_contents, | 116 CreateControllerClient(content::WebContents* web_contents, |
117 const UnsafeResourceList& unsafe_resources, | 117 const UnsafeResourceList& unsafe_resources, |
118 BaseUIManager* ui_manager); | 118 BaseUIManager* ui_manager); |
119 | 119 |
| 120 int GetHTMLTemplateId() override; |
| 121 |
| 122 void set_sb_error_ui(std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui); |
| 123 |
120 private: | 124 private: |
121 // For reporting back user actions. | 125 // For reporting back user actions. |
122 BaseUIManager* ui_manager_; | 126 BaseUIManager* ui_manager_; |
123 | 127 |
124 // The URL of the main frame that caused the warning. | 128 // The URL of the main frame that caused the warning. |
125 GURL main_frame_url_; | 129 GURL main_frame_url_; |
126 | 130 |
127 // The index of a navigation entry that should be removed when DontProceed() | 131 // The index of a navigation entry that should be removed when DontProceed() |
128 // is invoked, -1 if entry should not be removed. | 132 // is invoked, -1 if entry should not be removed. |
129 const int navigation_entry_index_to_remove_; | 133 const int navigation_entry_index_to_remove_; |
130 | 134 |
131 // The list of unsafe resources this page is warning about. | 135 // The list of unsafe resources this page is warning about. |
132 UnsafeResourceList unsafe_resources_; | 136 UnsafeResourceList unsafe_resources_; |
133 | 137 |
134 // For displaying safe browsing interstitial. | |
135 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; | |
136 | |
137 // Indicate whether user has proceeded this blocking page. | 138 // Indicate whether user has proceeded this blocking page. |
138 bool proceeded_; | 139 bool proceeded_; |
139 | 140 |
140 // After a safe browsing interstitial where the user opted-in to the | 141 // After a safe browsing interstitial where the user opted-in to the |
141 // report but clicked "proceed anyway", we delay the call to | 142 // report but clicked "proceed anyway", we delay the call to |
142 // ThreatDetails::FinishCollection() by this much time (in | 143 // ThreatDetails::FinishCollection() by this much time (in |
143 // milliseconds), in order to get data from the blocked resource itself. | 144 // milliseconds), in order to get data from the blocked resource itself. |
144 int64_t threat_details_proceed_delay_ms_; | 145 int64_t threat_details_proceed_delay_ms_; |
145 | 146 |
| 147 // For displaying safe browsing interstitial. |
| 148 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; |
| 149 |
146 DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage); | 150 DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage); |
147 }; | 151 }; |
148 | 152 |
149 } // namespace safe_browsing | 153 } // namespace safe_browsing |
150 | 154 |
151 #endif // COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ | 155 #endif // COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ |
OLD | NEW |