Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: extensions/common/install_warning.cc

Issue 22470007: Add a "key" entry to InstallWarnings, remove InstallWarning::Format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_infrastructure
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/install_warning.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/install_warning.cc
diff --git a/extensions/common/install_warning.cc b/extensions/common/install_warning.cc
index c632a71ae08f22cbdaaa15f713a6e6f373d4fa11..3db5a5be077ef3e04e56f02baaed225d534f1670 100644
--- a/extensions/common/install_warning.cc
+++ b/extensions/common/install_warning.cc
@@ -6,19 +6,27 @@
namespace extensions {
+InstallWarning::InstallWarning(const std::string& message) : message(message) {
+}
+
+InstallWarning::InstallWarning(const std::string& message,
+ const std::string& key)
+ : message(message), key(key) {
+}
+
+InstallWarning::InstallWarning(const std::string& message,
+ const std::string& key,
+ const std::string& specific)
+ : message(message), key(key), specific(specific) {
+}
+
+InstallWarning::~InstallWarning() {
+}
+
void PrintTo(const InstallWarning& warning, ::std::ostream* os) {
- *os << "InstallWarning(";
- switch (warning.format) {
- case InstallWarning::FORMAT_TEXT:
- *os << "FORMAT_TEXT, \"";
- break;
- case InstallWarning::FORMAT_HTML:
- *os << "FORMAT_HTML, \"";
- break;
- }
// This is just for test error messages, so no need to escape '"'
// characters inside the message.
- *os << warning.message << "\")";
+ *os << "InstallWarning(\"" << warning.message << "\")";
}
} // namespace extensions
« no previous file with comments | « extensions/common/install_warning.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698