OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Implementation of the SafeBrowsingBlockingPage class. | 5 // Implementation of the SafeBrowsingBlockingPage class. |
6 | 6 |
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 interstitial_type_ = TYPE_HARMFUL; | 185 interstitial_type_ = TYPE_HARMFUL; |
186 else | 186 else |
187 interstitial_type_ = TYPE_PHISHING; | 187 interstitial_type_ = TYPE_PHISHING; |
188 | 188 |
189 RecordUserDecision(SHOW); | 189 RecordUserDecision(SHOW); |
190 RecordUserInteraction(TOTAL_VISITS); | 190 RecordUserInteraction(TOTAL_VISITS); |
191 if (IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)) | 191 if (IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)) |
192 RecordUserDecision(PROCEEDING_DISABLED); | 192 RecordUserDecision(PROCEEDING_DISABLED); |
193 | 193 |
194 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 194 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
195 Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 195 Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
196 Profile::EXPLICIT_ACCESS); | 196 ServiceAccessType::EXPLICIT_ACCESS); |
197 if (history_service) { | 197 if (history_service) { |
198 history_service->GetVisibleVisitCountToHost( | 198 history_service->GetVisibleVisitCountToHost( |
199 request_url(), | 199 request_url(), |
200 base::Bind(&SafeBrowsingBlockingPage::OnGotHistoryCount, | 200 base::Bind(&SafeBrowsingBlockingPage::OnGotHistoryCount, |
201 base::Unretained(this)), | 201 base::Unretained(this)), |
202 &request_tracker_); | 202 &request_tracker_); |
203 } | 203 } |
204 | 204 |
205 if (!is_main_frame_load_blocked_) { | 205 if (!is_main_frame_load_blocked_) { |
206 navigation_entry_index_to_remove_ = | 206 navigation_entry_index_to_remove_ = |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 load_time_data->SetString( | 797 load_time_data->SetString( |
798 "explanationParagraph", | 798 "explanationParagraph", |
799 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, | 799 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, |
800 GetFormattedHostName())); | 800 GetFormattedHostName())); |
801 load_time_data->SetString( | 801 load_time_data->SetString( |
802 "finalParagraph", | 802 "finalParagraph", |
803 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 803 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
804 | 804 |
805 PopulateExtendedReportingOption(load_time_data); | 805 PopulateExtendedReportingOption(load_time_data); |
806 } | 806 } |
OLD | NEW |