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

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: Nits 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 web_contents_->OpenURL(params); 411 web_contents_->OpenURL(params);
412 return; 412 return;
413 } 413 }
414 414
415 if (command == kShowDiagnosticCommand) { 415 if (command == kShowDiagnosticCommand) {
416 // We're going to take the user to Google's SafeBrowsing diagnostic page. 416 // We're going to take the user to Google's SafeBrowsing diagnostic page.
417 std::string diagnostic = 417 std::string diagnostic =
418 base::StringPrintf(kSbDiagnosticUrl, 418 base::StringPrintf(kSbDiagnosticUrl,
419 net::EscapeQueryParamValue(bad_url_spec, true).c_str()); 419 net::EscapeQueryParamValue(bad_url_spec, true).c_str());
420 GURL diagnostic_url(diagnostic); 420 GURL diagnostic_url(diagnostic);
421 diagnostic_url = google_util::AppendGoogleLocaleParam(diagnostic_url); 421 diagnostic_url = google_util::AppendGoogleLocaleParam(
422 diagnostic_url, g_browser_process->GetApplicationLocale());
422 DCHECK(unsafe_resources_[element_index].threat_type == 423 DCHECK(unsafe_resources_[element_index].threat_type ==
423 SB_THREAT_TYPE_URL_MALWARE || 424 SB_THREAT_TYPE_URL_MALWARE ||
424 unsafe_resources_[element_index].threat_type == 425 unsafe_resources_[element_index].threat_type ==
425 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); 426 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL);
426 OpenURLParams params( 427 OpenURLParams params(
427 diagnostic_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, 428 diagnostic_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK,
428 false); 429 false);
429 web_contents_->OpenURL(params); 430 web_contents_->OpenURL(params);
430 return; 431 return;
431 } 432 }
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 strings->SetString("details", std::string()); 1186 strings->SetString("details", std::string());
1186 strings->SetString("confirm_text", std::string()); 1187 strings->SetString("confirm_text", std::string());
1187 strings->SetString(kBoxChecked, std::string()); 1188 strings->SetString(kBoxChecked, std::string());
1188 strings->SetString( 1189 strings->SetString(
1189 "report_error", 1190 "report_error",
1190 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); 1191 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR));
1191 strings->SetBoolean(kDisplayCheckBox, false); 1192 strings->SetBoolean(kDisplayCheckBox, false);
1192 strings->SetString("learnMore", 1193 strings->SetString("learnMore",
1193 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); 1194 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
1194 } 1195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698