Chromium Code Reviews| Index: extensions/common/install_warning.h |
| diff --git a/extensions/common/install_warning.h b/extensions/common/install_warning.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d08abecff0c9fa94287226851cb8874c9ae333e2 |
| --- /dev/null |
| +++ b/extensions/common/install_warning.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2013 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_INSTALL_WARNING_H_ |
| +#define EXTENSIONS_COMMON_INSTALL_WARNING_H_ |
| + |
| +#include <string> |
| + |
| +namespace extensions { |
| + |
| +struct InstallWarning { |
| + enum Format { |
| + // IMPORTANT: Do not build HTML strings from user or developer-supplied |
| + // input. |
| + FORMAT_TEXT, |
| + FORMAT_HTML, |
| + }; |
| + InstallWarning(Format format, const std::string& message) |
| + : format(format), message(message) { |
| + } |
| + bool operator==(const InstallWarning& other) const { |
| + return format == other.format && message == other.message; |
| + } |
| + Format format; |
| + std::string message; |
| +}; |
| + |
| +// Let gtest print InstallWarnings. |
| +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.
|
| + |
| +} // namespace |
| + |
| +#endif // EXTENSIONS_COMMON_INSTALL_WARNING_H_ |