diff options
Diffstat (limited to 'chromium/extensions/common/error_utils.h')
-rw-r--r-- | chromium/extensions/common/error_utils.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chromium/extensions/common/error_utils.h b/chromium/extensions/common/error_utils.h new file mode 100644 index 00000000000..fedbd2887ba --- /dev/null +++ b/chromium/extensions/common/error_utils.h @@ -0,0 +1,44 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef EXTENSIONS_COMMON_ERROR_UTILS_H_ +#define EXTENSIONS_COMMON_ERROR_UTILS_H_ + +#include <string> + +#include "base/strings/string16.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(const std::string& format, + const std::string& s1, + const std::string& s2); + + static std::string FormatErrorMessage(const std::string& format, + const std::string& s1, + const std::string& s2, + const std::string& s3); + + static base::string16 FormatErrorMessageUTF16(const std::string& format, + const std::string& s1); + + static base::string16 FormatErrorMessageUTF16(const std::string& format, + const std::string& s1, + const std::string& s2); + + static base::string16 FormatErrorMessageUTF16(const std::string& format, + const std::string& s1, + const std::string& s2, + const std::string& s3); +}; + +} // namespace extensions + +#endif // EXTENSIONS_COMMON_ERROR_UTILS_H_ |