blob: 2575897ffeb573b171b5dcc90119f8b0902b82ce [file] [log] [blame]
[email protected]fc670822011-12-17 09:33:491// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]c6619182009-05-12 14:59:322// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]e9f541a2012-11-19 21:52:315#ifndef EXTENSIONS_COMMON_ERROR_UTILS_H_
6#define EXTENSIONS_COMMON_ERROR_UTILS_H_
[email protected]c6619182009-05-12 14:59:327
8#include <string>
9
[email protected]f4390962013-06-11 07:29:2210#include "base/strings/string16.h"
rdevlin.cronin24e89642016-12-28 23:48:4011#include "base/strings/string_piece.h"
[email protected]fc670822011-12-17 09:33:4912
[email protected]e9f541a2012-11-19 21:52:3113namespace extensions {
14
15class ErrorUtils {
[email protected]11f4857282009-11-13 19:56:1716 public:
[email protected]6657afa62009-11-04 02:15:2017 // Creates an error messages from a pattern.
rdevlin.cronin24e89642016-12-28 23:48:4018 static std::string FormatErrorMessage(base::StringPiece format,
19 base::StringPiece s1);
[email protected]c6619182009-05-12 14:59:3220
rdevlin.cronin24e89642016-12-28 23:48:4021 static std::string FormatErrorMessage(base::StringPiece format,
22 base::StringPiece s1,
23 base::StringPiece s2);
[email protected]6657afa62009-11-04 02:15:2024
rdevlin.cronin24e89642016-12-28 23:48:4025 static std::string FormatErrorMessage(base::StringPiece format,
26 base::StringPiece s1,
27 base::StringPiece s2,
28 base::StringPiece s3);
[email protected]fc670822011-12-17 09:33:4929
Karan Bhatia9e9ab2722017-08-29 19:52:4130 static std::string FormatErrorMessage(base::StringPiece format,
31 base::StringPiece s1,
32 base::StringPiece s2,
33 base::StringPiece s3,
34 base::StringPiece s4);
35
rdevlin.cronin24e89642016-12-28 23:48:4036 static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
37 base::StringPiece s1);
[email protected]fc670822011-12-17 09:33:4938
rdevlin.cronin24e89642016-12-28 23:48:4039 static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
40 base::StringPiece s1,
41 base::StringPiece s2);
[email protected]fc670822011-12-17 09:33:4942
rdevlin.cronin24e89642016-12-28 23:48:4043 static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
44 base::StringPiece s1,
45 base::StringPiece s2,
46 base::StringPiece s3);
Karan Bhatia9e9ab2722017-08-29 19:52:4147
48 static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
49 base::StringPiece s1,
50 base::StringPiece s2,
51 base::StringPiece s3,
52 base::StringPiece s4);
[email protected]c6619182009-05-12 14:59:3253};
54
[email protected]e9f541a2012-11-19 21:52:3155} // namespace extensions
56
57#endif // EXTENSIONS_COMMON_ERROR_UTILS_H_