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

Unified Diff: services/catalog/entry.cc

Issue 1943993005: Remove wildcard usage in interface lists (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 | « services/catalog/data/wildcard_interfaces ('k') | services/catalog/entry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/entry.cc
diff --git a/services/catalog/entry.cc b/services/catalog/entry.cc
index 9734f92d3747d72ff660ff32d298e1dd86357504..9d477b13815913b53c69f5a9f72f2525d1156641 100644
--- a/services/catalog/entry.cc
+++ b/services/catalog/entry.cc
@@ -98,13 +98,21 @@ bool BuildCapabilities(const base::DictionaryValue& value,
<< "capabilities dictionary.";
return false;
}
+ shell::Interfaces interfaces;
if (!ReadStringSetFromDictionary(*entry_value,
Store::kCapabilities_InterfacesKey,
- &spec.interfaces)) {
+ &interfaces)) {
LOG(ERROR) << "Entry::Deserialize: Invalid interfaces list in required "
<< "capabilities dictionary.";
return false;
}
+ if (interfaces.count("*") > 0) {
+ LOG(ERROR) << "Entry::Deserializer: Wildcard not valid in interfaces "
+ << "list.";
+ return false;
+ }
+ spec.interfaces = interfaces;
+
capabilities->required[it.key()] = spec;
}
}
« no previous file with comments | « services/catalog/data/wildcard_interfaces ('k') | services/catalog/entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698