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

Unified Diff: chrome/common/extensions/features/simple_feature_filter.h

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/simple_feature_filter.h
diff --git a/chrome/common/extensions/features/simple_feature_filter.h b/chrome/common/extensions/features/simple_feature_filter.h
deleted file mode 100644
index 7c4726a051e4a5da319d37bb98c6d21955cdefe1..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/features/simple_feature_filter.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_FILTER_H_
-#define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_FILTER_H_
-
-#include <string>
-
-#include "extensions/common/features/feature.h"
-#include "extensions/common/manifest.h"
-
-class GURL;
-
-namespace base {
-class DictionaryValue;
-}
-
-namespace extensions {
-
-class SimpleFeature;
-
-// A SimpleFeatureFilter can be attached to SimpleFeature objects to provide
-// additional parsing and availability filtering behavior.
-class SimpleFeatureFilter {
- public:
- explicit SimpleFeatureFilter(SimpleFeature* feature);
- virtual ~SimpleFeatureFilter();
-
- SimpleFeature* feature() const { return feature_; }
-
- // Parses any additional feature data that may be used by this filter.
- // Returns an error string on failure or the empty string on success.
- // The default implementation simply returns the empty string.
- virtual std::string Parse(const base::DictionaryValue* value);
-
- // Indicates whether or not the owning feature is available within a given
- // extensions context. The default implementation only affirms availability.
- virtual Feature::Availability IsAvailableToContext(
- const Extension* extension,
- Feature::Context context,
- const GURL& url,
- Feature::Platform platform) const;
-
- // Indicates whether or not the owning feature is available to a given
- // extension manifest. The default implementation only affirms availability.
- virtual Feature::Availability IsAvailableToManifest(
- const std::string& extension_id,
- Manifest::Type type,
- Feature::Location location,
- int manifest_version,
- Feature::Platform platform) const;
-
- private:
- // The feature which owns this filter.
- SimpleFeature* feature_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleFeatureFilter);
-};
-
-} // namespace extensions
-
-#endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698