Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 327793005: Change google_util::AppendGoogleLocaleParam to take in the application locale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromeOS fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698