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

Unified Diff: chrome/common/extensions/manifest_handlers/externally_connectable.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
Index: chrome/common/extensions/manifest_handlers/externally_connectable.cc
diff --git a/chrome/common/extensions/manifest_handlers/externally_connectable.cc b/chrome/common/extensions/manifest_handlers/externally_connectable.cc
index 60f928c318bd21f4768c248403c90c5997a8b60a..af10d75768c00777a6e6fb54f96ec548e92a6372 100644
--- a/chrome/common/extensions/manifest_handlers/externally_connectable.cc
+++ b/chrome/common/extensions/manifest_handlers/externally_connectable.cc
@@ -118,8 +118,10 @@ scoped_ptr<ExternallyConnectableInfo> ExternallyConnectableInfo::FromValue(
// Wildcard hosts are not allowed.
if (pattern.host().empty()) {
// Warning not error for forwards compatibility.
- install_warnings->push_back(
- InstallWarning::Text(ErrorUtils::FormatErrorMessage(
+ install_warnings->push_back(InstallWarning(
+ keys::kExternallyConnectable,
+ *it,
+ ErrorUtils::FormatErrorMessage(
errors::kErrorWildcardHostsNotAllowed, *it)));
continue;
}
@@ -146,7 +148,9 @@ scoped_ptr<ExternallyConnectableInfo> ExternallyConnectableInfo::FromValue(
// are not allowed. However just "appspot.com" is ok.
if (registry_length == 0 && pattern.match_subdomains()) {
// Warning not error for forwards compatibility.
- install_warnings->push_back(InstallWarning::Text(
+ install_warnings->push_back(InstallWarning(
+ keys::kExternallyConnectable,
+ *it,
ErrorUtils::FormatErrorMessage(
errors::kErrorTopLevelDomainsNotAllowed,
pattern.host().c_str(),
@@ -179,7 +183,8 @@ scoped_ptr<ExternallyConnectableInfo> ExternallyConnectableInfo::FromValue(
if (!externally_connectable->matches &&
!externally_connectable->ids) {
- install_warnings->push_back(InstallWarning::Text(
+ install_warnings->push_back(InstallWarning(
+ keys::kExternallyConnectable,
errors::kErrorNothingSpecified));
}

Powered by Google App Engine
This is Rietveld 408576698