OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef EXTENSIONS_COMMON_INSTALL_WARNING_H_ | |
6 #define EXTENSIONS_COMMON_INSTALL_WARNING_H_ | |
7 | |
8 #include <string> | |
9 | |
10 namespace extensions { | |
11 | |
12 struct InstallWarning { | |
13 enum Format { | |
14 // IMPORTANT: Do not build HTML strings from user or developer-supplied | |
15 // input. | |
16 FORMAT_TEXT, | |
17 FORMAT_HTML, | |
18 }; | |
19 InstallWarning(Format format, const std::string& message) | |
20 : format(format), message(message) { | |
21 } | |
22 bool operator==(const InstallWarning& other) const { | |
23 return format == other.format && message == other.message; | |
24 } | |
25 Format format; | |
26 std::string message; | |
27 }; | |
28 | |
29 // Let gtest print InstallWarnings. | |
30 void PrintTo(const InstallWarning&, ::std::ostream* os); | |
Jeffrey Yasskin
2013/01/30 01:28:42
This needs either #include <iosfwd> or #include <o
Yoyo Zhou
2013/01/30 20:33:08
Moved ostream include from .cc to here.
| |
31 | |
32 } // namespace | |
33 | |
34 #endif // EXTENSIONS_COMMON_INSTALL_WARNING_H_ | |
OLD | NEW |