blob: 709e7c41ce3a80a36236d1dc842f0dd04b461f9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2011 The Chromium Authors
// 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/string_piece.h"
namespace extensions {
class ErrorUtils {
public:
// Creates an error messages from a pattern.
static std::string FormatErrorMessage(base::StringPiece format,
base::StringPiece s1);
static std::string FormatErrorMessage(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2);
static std::string FormatErrorMessage(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2,
base::StringPiece s3);
static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1);
static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2);
static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2,
base::StringPiece s3);
};
} // namespace extensions
#endif // EXTENSIONS_COMMON_ERROR_UTILS_H_
|