[email protected] | fc67082 | 2011-12-17 09:33:49 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | e9f541a | 2012-11-19 21:52:31 | [diff] [blame] | 5 | #ifndef EXTENSIONS_COMMON_ERROR_UTILS_H_ |
| 6 | #define EXTENSIONS_COMMON_ERROR_UTILS_H_ |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
[email protected] | f439096 | 2013-06-11 07:29:22 | [diff] [blame^] | 10 | #include "base/strings/string16.h" |
[email protected] | fc67082 | 2011-12-17 09:33:49 | [diff] [blame] | 11 | |
[email protected] | e9f541a | 2012-11-19 21:52:31 | [diff] [blame] | 12 | namespace extensions { |
| 13 | |
| 14 | class ErrorUtils { |
[email protected] | 11f485728 | 2009-11-13 19:56:17 | [diff] [blame] | 15 | public: |
[email protected] | 6657afa6 | 2009-11-04 02:15:20 | [diff] [blame] | 16 | // Creates an error messages from a pattern. |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 17 | static std::string FormatErrorMessage(const std::string& format, |
[email protected] | fc67082 | 2011-12-17 09:33:49 | [diff] [blame] | 18 | const std::string& s1); |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 19 | |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 20 | static std::string FormatErrorMessage(const std::string& format, |
[email protected] | fc67082 | 2011-12-17 09:33:49 | [diff] [blame] | 21 | const std::string& s1, |
| 22 | const std::string& s2); |
[email protected] | 6657afa6 | 2009-11-04 02:15:20 | [diff] [blame] | 23 | |
| 24 | static std::string FormatErrorMessage(const std::string& format, |
[email protected] | fc67082 | 2011-12-17 09:33:49 | [diff] [blame] | 25 | const std::string& s1, |
| 26 | const std::string& s2, |
| 27 | const std::string& s3); |
| 28 | |
| 29 | static string16 FormatErrorMessageUTF16(const std::string& format, |
| 30 | const std::string& s1); |
| 31 | |
| 32 | static string16 FormatErrorMessageUTF16(const std::string& format, |
| 33 | const std::string& s1, |
| 34 | const std::string& s2); |
| 35 | |
| 36 | static string16 FormatErrorMessageUTF16(const std::string& format, |
| 37 | const std::string& s1, |
| 38 | const std::string& s2, |
| 39 | const std::string& s3); |
[email protected] | c661918 | 2009-05-12 14:59:32 | [diff] [blame] | 40 | }; |
| 41 | |
[email protected] | e9f541a | 2012-11-19 21:52:31 | [diff] [blame] | 42 | } // namespace extensions |
| 43 | |
| 44 | #endif // EXTENSIONS_COMMON_ERROR_UTILS_H_ |