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

Unified Diff: chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc

Issue 1786263002: Remove uses of ENABLE_CONFIGURATION_POLICY from src/chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sort Created 4 years, 9 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/api/storage/storage_schema_manifest_handler.cc
diff --git a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
index a8a7588debc99435e8bc50e3d7367504b2ce2937..9cac6f73c59f406445cef5b5e311b3133ee7a75f 100644
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
@@ -13,6 +13,7 @@
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "components/policy/core/common/schema.h"
#include "extensions/common/extension.h"
#include "extensions/common/install_warning.h"
#include "extensions/common/manifest.h"
@@ -22,10 +23,6 @@
#include "extensions/common/permissions/api_permission_set.h"
#include "extensions/common/permissions/permissions_info.h"
-#if defined(ENABLE_CONFIGURATION_POLICY)
-#include "components/policy/core/common/schema.h"
-#endif
-
using extensions::manifest_keys::kStorageManagedSchema;
namespace extensions {
@@ -34,7 +31,6 @@ StorageSchemaManifestHandler::StorageSchemaManifestHandler() {}
StorageSchemaManifestHandler::~StorageSchemaManifestHandler() {}
-#if defined(ENABLE_CONFIGURATION_POLICY)
// static
policy::Schema StorageSchemaManifestHandler::GetSchema(
const Extension* extension,
@@ -60,7 +56,6 @@ policy::Schema StorageSchemaManifestHandler::GetSchema(
}
return policy::Schema::Parse(content, error);
}
-#endif
bool StorageSchemaManifestHandler::Parse(Extension* extension,
base::string16* error) {
@@ -82,11 +77,7 @@ bool StorageSchemaManifestHandler::Validate(
const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const {
-#if defined(ENABLE_CONFIGURATION_POLICY)
return GetSchema(extension, error).valid();
-#else
- return true;
-#endif
}
const std::vector<std::string> StorageSchemaManifestHandler::Keys() const {

Powered by Google App Engine
This is Rietveld 408576698