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

Unified Diff: chrome/common/extensions/permissions/permissions_data.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/permissions/permissions_data.cc
diff --git a/chrome/common/extensions/permissions/permissions_data.cc b/chrome/common/extensions/permissions/permissions_data.cc
index aa3c04aa8ebdfe67b575faab6e4df97ba52a1686..a471f22784a9845209eaa9b291605a0a3214a8e3 100644
--- a/chrome/common/extensions/permissions/permissions_data.cc
+++ b/chrome/common/extensions/permissions/permissions_data.cc
@@ -157,8 +157,8 @@ bool ParseHelper(Extension* extension,
// Don't fail, but warn the developer that the manifest contains
// unrecognized permissions. This may happen legitimately if the
// extensions requests platform- or channel-specific permissions.
- extension->AddInstallWarning(InstallWarning(InstallWarning::FORMAT_TEXT,
- availability.message()));
+ extension->AddInstallWarning(InstallWarning(availability.message(),
+ feature->name()));
to_remove.push_back(iter->id());
continue;
}
@@ -231,10 +231,11 @@ bool ParseHelper(Extension* extension,
// It's probably an unknown API permission. Do not throw an error so
// extensions can retain backwards compatability (http://crbug.com/42742).
extension->AddInstallWarning(InstallWarning(
- InstallWarning::FORMAT_TEXT,
- base::StringPrintf(
+ base::StringPrintf(
"Permission '%s' is unknown or URL pattern is malformed.",
- permission_str.c_str())));
+ permission_str.c_str()),
+ key,
+ permission_str));
}
return true;
« no previous file with comments | « chrome/common/extensions/manifest_handlers/externally_connectable.cc ('k') | extensions/common/install_warning.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698