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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 web_contents_->OpenURL(params); | 446 web_contents_->OpenURL(params); |
447 return; | 447 return; |
448 } | 448 } |
449 | 449 |
450 if (command == kShowDiagnosticCommand) { | 450 if (command == kShowDiagnosticCommand) { |
451 // We're going to take the user to Google's SafeBrowsing diagnostic page. | 451 // We're going to take the user to Google's SafeBrowsing diagnostic page. |
452 std::string diagnostic = | 452 std::string diagnostic = |
453 base::StringPrintf(kSbDiagnosticUrl, | 453 base::StringPrintf(kSbDiagnosticUrl, |
454 net::EscapeQueryParamValue(bad_url_spec, true).c_str()); | 454 net::EscapeQueryParamValue(bad_url_spec, true).c_str()); |
455 GURL diagnostic_url(diagnostic); | 455 GURL diagnostic_url(diagnostic); |
456 diagnostic_url = google_util::AppendGoogleLocaleParam(diagnostic_url); | 456 diagnostic_url = google_util::AppendGoogleLocaleParam( |
| 457 diagnostic_url, g_browser_process->GetApplicationLocale()); |
457 DCHECK(unsafe_resources_[element_index].threat_type == | 458 DCHECK(unsafe_resources_[element_index].threat_type == |
458 SB_THREAT_TYPE_URL_MALWARE || | 459 SB_THREAT_TYPE_URL_MALWARE || |
459 unsafe_resources_[element_index].threat_type == | 460 unsafe_resources_[element_index].threat_type == |
460 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); | 461 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); |
461 OpenURLParams params( | 462 OpenURLParams params( |
462 diagnostic_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, | 463 diagnostic_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, |
463 false); | 464 false); |
464 web_contents_->OpenURL(params); | 465 web_contents_->OpenURL(params); |
465 return; | 466 return; |
466 } | 467 } |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION1, | 1344 IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION1, |
1344 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 1345 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
1345 base::UTF8ToUTF16(url_.host()))); | 1346 base::UTF8ToUTF16(url_.host()))); |
1346 load_time_data->SetString( | 1347 load_time_data->SetString( |
1347 "secondParagraph", | 1348 "secondParagraph", |
1348 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION2)); | 1349 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION2)); |
1349 load_time_data->SetString( | 1350 load_time_data->SetString( |
1350 "detailsText", | 1351 "detailsText", |
1351 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); | 1352 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); |
1352 } | 1353 } |
OLD | NEW |