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

Unified Diff: chrome/common/extensions/features/manifest_feature.cc

Issue 224163002: Move core features code to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move tests Created 6 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/features/manifest_feature.cc
diff --git a/chrome/common/extensions/features/manifest_feature.cc b/chrome/common/extensions/features/manifest_feature.cc
deleted file mode 100644
index a8d6e42a409e99b4f2c172d3522230e89cef6ffc..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/features/manifest_feature.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/extensions/features/manifest_feature.h"
-
-#include "extensions/common/manifest.h"
-
-namespace extensions {
-
-ManifestFeature::ManifestFeature() {
-}
-
-ManifestFeature::~ManifestFeature() {
-}
-
-Feature::Availability ManifestFeature::IsAvailableToContext(
- const Extension* extension,
- Feature::Context context,
- const GURL& url,
- Feature::Platform platform) const {
- Availability availability = SimpleFeature::IsAvailableToContext(extension,
- context,
- url,
- platform);
- if (!availability.is_available())
- return availability;
-
- // We know we can skip manifest()->GetKey() here because we just did the same
- // validation it would do above.
- if (extension && !extension->manifest()->value()->HasKey(name()))
- return CreateAvailability(NOT_PRESENT, extension->GetType());
-
- return CreateAvailability(IS_AVAILABLE);
-}
-
-std::string ManifestFeature::Parse(const base::DictionaryValue* value) {
- std::string error = SimpleFeature::Parse(value);
- if (!error.empty())
- return error;
-
- if (extension_types()->empty()) {
- return name() + ": Manifest features must specify at least one " +
- "value for extension_types.";
- }
-
- if (!GetContexts()->empty())
- return name() + ": Manifest features do not support contexts.";
-
- return std::string();
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698