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

Unified Diff: extensions/common/error_utils.h

Issue 2604033002: [Extensions] Use base::StringPiece in ErrorUtils (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | extensions/common/error_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/error_utils.h
diff --git a/extensions/common/error_utils.h b/extensions/common/error_utils.h
index fedbd2887ba510a41caa393149c623fd43f52a09..5f86ee0bd3ae329fc0cd4d71bd7bb6b6ddbde277 100644
--- a/extensions/common/error_utils.h
+++ b/extensions/common/error_utils.h
@@ -8,35 +8,36 @@
#include <string>
#include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
namespace extensions {
class ErrorUtils {
public:
// Creates an error messages from a pattern.
- static std::string FormatErrorMessage(const std::string& format,
- const std::string& s1);
+ static std::string FormatErrorMessage(base::StringPiece format,
+ base::StringPiece s1);
- static std::string FormatErrorMessage(const std::string& format,
- const std::string& s1,
- const std::string& s2);
+ static std::string FormatErrorMessage(base::StringPiece format,
+ base::StringPiece s1,
+ base::StringPiece s2);
- static std::string FormatErrorMessage(const std::string& format,
- const std::string& s1,
- const std::string& s2,
- const std::string& s3);
+ static std::string FormatErrorMessage(base::StringPiece format,
+ base::StringPiece s1,
+ base::StringPiece s2,
+ base::StringPiece s3);
- static base::string16 FormatErrorMessageUTF16(const std::string& format,
- const std::string& s1);
+ static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ base::StringPiece s1);
- static base::string16 FormatErrorMessageUTF16(const std::string& format,
- const std::string& s1,
- const std::string& s2);
+ static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ base::StringPiece s1,
+ base::StringPiece s2);
- static base::string16 FormatErrorMessageUTF16(const std::string& format,
- const std::string& s1,
- const std::string& s2,
- const std::string& s3);
+ static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ base::StringPiece s1,
+ base::StringPiece s2,
+ base::StringPiece s3);
};
} // namespace extensions
« no previous file with comments | « no previous file | extensions/common/error_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698