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

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
« no previous file with comments | « chrome/common/extensions/manifest.cc ('k') | chrome/common/extensions/permissions/permissions_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2a6e3093f1a0223c0a8dea150233c1df6572051a..243f8d6e177bcae7d81e1e2a2073831c18bbde09 100644
--- a/chrome/common/extensions/manifest_handlers/externally_connectable.cc
+++ b/chrome/common/extensions/manifest_handlers/externally_connectable.cc
@@ -118,9 +118,11 @@ 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(
- errors::kErrorWildcardHostsNotAllowed, *it)));
+ install_warnings->push_back(InstallWarning(
+ ErrorUtils::FormatErrorMessage(
+ errors::kErrorWildcardHostsNotAllowed, *it),
+ keys::kExternallyConnectable,
+ *it));
continue;
}
@@ -146,11 +148,13 @@ 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(
ErrorUtils::FormatErrorMessage(
errors::kErrorTopLevelDomainsNotAllowed,
pattern.host().c_str(),
- *it)));
+ *it),
+ keys::kExternallyConnectable,
+ *it));
continue;
}
@@ -179,8 +183,9 @@ scoped_ptr<ExternallyConnectableInfo> ExternallyConnectableInfo::FromValue(
if (!externally_connectable->matches &&
!externally_connectable->ids) {
- install_warnings->push_back(InstallWarning::Text(
- errors::kErrorNothingSpecified));
+ install_warnings->push_back(InstallWarning(
+ errors::kErrorNothingSpecified,
+ keys::kExternallyConnectable));
}
return make_scoped_ptr(
« no previous file with comments | « chrome/common/extensions/manifest.cc ('k') | chrome/common/extensions/permissions/permissions_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698