Chromium Code Reviews| Index: extensions/common/install_warning.h |
| diff --git a/extensions/common/install_warning.h b/extensions/common/install_warning.h |
| index fb3fccb29b6e6de7be242e83b0295aff933f9d24..7b7b2f342572d3d107c1615cc5ebea50b6731326 100644 |
| --- a/extensions/common/install_warning.h |
| +++ b/extensions/common/install_warning.h |
| @@ -11,22 +11,24 @@ |
| namespace extensions { |
| struct InstallWarning { |
| - enum Format { |
| - // IMPORTANT: Do not build HTML strings from user or developer-supplied |
| - // input. |
| - FORMAT_TEXT, |
| - FORMAT_HTML, |
| - }; |
| - static InstallWarning Text(const std::string& message) { |
| - return InstallWarning(FORMAT_TEXT, message); |
| - } |
| - InstallWarning(Format format, const std::string& message) |
| - : format(format), message(message) { |
| - } |
| + InstallWarning(const std::string& message); |
| + InstallWarning(const std::string& key, |
|
Yoyo Zhou
2013/08/14 22:40:36
This is slightly unintuitive. Usually when you all
Devlin
2013/08/15 00:20:26
Done.
|
| + const std::string& message); |
| + InstallWarning(const std::string& key, |
| + const std::string& specific, |
| + const std::string& message); |
| + ~InstallWarning(); |
| + |
| bool operator==(const InstallWarning& other) const { |
| - return format == other.format && message == other.message; |
| + return message == other.message; |
|
Yoyo Zhou
2013/08/14 22:40:36
Maybe comment why this is appropriate and we can i
Devlin
2013/08/15 00:20:26
Done.
|
| } |
| - Format format; |
| + |
| + // The manifest key to which this warning pertains (e.g., 'permissions'). |
|
Yoyo Zhou
2013/08/14 22:40:36
This is also optional, right?
Devlin
2013/08/15 00:20:26
Done.
|
| + std::string key; |
| + // Optional. The specific portion of the key which caused the warning. For |
| + // instance, a single faulty permission in the 'permissions' key. |
| + std::string specific; |
| + // The warning's message. |
| std::string message; |
| }; |