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

Unified Diff: chrome/common/extensions/extension_error_utils.cc

Issue 340057: Add first-class support for user scripts (Closed)
Patch Set: newness Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_error_utils.cc
diff --git a/chrome/common/extensions/extension_error_utils.cc b/chrome/common/extensions/extension_error_utils.cc
index 724cdcd78e5e8d24a910e31156899404b21dd697..0256c8d8e634a8ab80c5faac481e016de4485866 100644
--- a/chrome/common/extensions/extension_error_utils.cc
+++ b/chrome/common/extensions/extension_error_utils.cc
@@ -8,7 +8,7 @@
std::string ExtensionErrorUtils::FormatErrorMessage(
const std::string& format,
- const std::string s1) {
+ const std::string& s1) {
std::string ret_val = format;
ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s1);
return ret_val;
@@ -16,10 +16,22 @@ std::string ExtensionErrorUtils::FormatErrorMessage(
std::string ExtensionErrorUtils::FormatErrorMessage(
const std::string& format,
- const std::string s1,
- const std::string s2) {
+ const std::string& s1,
+ const std::string& s2) {
std::string ret_val = format;
ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s1);
ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s2);
return ret_val;
}
+
+std::string ExtensionErrorUtils::FormatErrorMessage(
+ const std::string& format,
+ const std::string& s1,
+ const std::string& s2,
+ const std::string& s3) {
+ std::string ret_val = format;
+ ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s1);
+ ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s2);
+ ReplaceFirstSubstringAfterOffset(&ret_val, 0, "*", s3);
+ return ret_val;
+}

Powered by Google App Engine
This is Rietveld 408576698