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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 PopulateStringDictionary( 997 PopulateStringDictionary(
998 strings, 998 strings,
999 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_TITLE), 999 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_TITLE),
1000 headline, 1000 headline,
1001 description1, 1001 description1,
1002 description2, 1002 description2,
1003 description3); 1003 description3);
1004 1004
1005 if (!CanShowMalwareDetailsOption()) { 1005 if (!CanShowMalwareDetailsOption()) {
1006 strings->SetBoolean(kDisplayCheckBox, false); 1006 strings->SetBoolean(kDisplayCheckBox, false);
1007 strings->SetString("confirm_text", ""); 1007 strings->SetString("confirm_text", std::string());
1008 strings->SetString(kBoxChecked, ""); 1008 strings->SetString(kBoxChecked, std::string());
1009 } else { 1009 } else {
1010 // Show the checkbox for sending malware details. 1010 // Show the checkbox for sending malware details.
1011 strings->SetBoolean(kDisplayCheckBox, true); 1011 strings->SetBoolean(kDisplayCheckBox, true);
1012 1012
1013 std::string privacy_link = base::StringPrintf( 1013 std::string privacy_link = base::StringPrintf(
1014 kPrivacyLinkHtml, 1014 kPrivacyLinkHtml,
1015 l10n_util::GetStringUTF8( 1015 l10n_util::GetStringUTF8(
1016 IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE_V2).c_str()); 1016 IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE_V2).c_str());
1017 1017
1018 strings->SetString("confirm_text", 1018 strings->SetString("confirm_text",
1019 l10n_util::GetStringFUTF16( 1019 l10n_util::GetStringFUTF16(
1020 IDS_SAFE_BROWSING_MALWARE_V2_REPORTING_AGREE, 1020 IDS_SAFE_BROWSING_MALWARE_V2_REPORTING_AGREE,
1021 UTF8ToUTF16(privacy_link))); 1021 UTF8ToUTF16(privacy_link)));
1022 if (IsPrefEnabled(prefs::kSafeBrowsingReportingEnabled)) 1022 if (IsPrefEnabled(prefs::kSafeBrowsingReportingEnabled))
1023 strings->SetString(kBoxChecked, "yes"); 1023 strings->SetString(kBoxChecked, "yes");
1024 else 1024 else
1025 strings->SetString(kBoxChecked, ""); 1025 strings->SetString(kBoxChecked, std::string());
1026 } 1026 }
1027 1027
1028 strings->SetString("report_error", string16()); 1028 strings->SetString("report_error", string16());
1029 strings->SetString("learnMore", 1029 strings->SetString("learnMore",
1030 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); 1030 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
1031 } 1031 }
1032 1032
1033 void SafeBrowsingBlockingPageV2::PopulatePhishingStringDictionary( 1033 void SafeBrowsingBlockingPageV2::PopulatePhishingStringDictionary(
1034 DictionaryValue* strings) { 1034 DictionaryValue* strings) {
1035 PopulateStringDictionary( 1035 PopulateStringDictionary(
1036 strings, 1036 strings,
1037 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_TITLE), 1037 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_TITLE),
1038 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_HEADLINE), 1038 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_HEADLINE),
1039 l10n_util::GetStringFUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION1, 1039 l10n_util::GetStringFUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION1,
1040 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 1040 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
1041 UTF8ToUTF16(url_.host())), 1041 UTF8ToUTF16(url_.host())),
1042 string16(), 1042 string16(),
1043 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION2)); 1043 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION2));
1044 1044
1045 strings->SetString("details", ""); 1045 strings->SetString("details", std::string());
1046 strings->SetString("confirm_text", ""); 1046 strings->SetString("confirm_text", std::string());
1047 strings->SetString(kBoxChecked, ""); 1047 strings->SetString(kBoxChecked, std::string());
1048 strings->SetString("report_error", 1048 strings->SetString(
1049 "report_error",
1049 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); 1050 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR));
1050 strings->SetBoolean(kDisplayCheckBox, false); 1051 strings->SetBoolean(kDisplayCheckBox, false);
1051 strings->SetString("learnMore", 1052 strings->SetString("learnMore",
1052 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); 1053 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
1053 } 1054 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_unittest.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