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

Unified Diff: chrome/browser/extensions/api/storage/managed_value_store_cache.cc

Issue 464893002: Accept invalid Schemas for the managed storage API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use an empty schema if schema validation failed Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/storage/managed_value_store_cache.cc
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
index c9e9f4a4a4c08a0c8c6c464f0c30328cb8f01d94..012f5d664f1aa95ce458369f994f21e09ac2fa5e 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -206,7 +206,10 @@ void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnBlockingPool(
std::string error;
policy::Schema schema =
StorageSchemaManifestHandler::GetSchema(it->get(), &error);
- CHECK(schema.valid()) << error;
+ // If the schema is invalid then proceed with an empty schema. The extension
+ // will be listed in chrome://policy but won't be able to load any policies.
not at google - send to devlin 2014/08/13 17:27:31 It'd be nice to try to recover the policy in this
Joao da Silva 2014/08/14 11:56:57 sgtm. Shouldn't we try to do the same recovery for
+ if (!schema.valid())
+ schema = policy::Schema();
(*components)[(*it)->id()] = schema;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698