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

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

Issue 2137463003: [Extensions] Move Feature channel code into //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 4 years, 5 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 | « extensions/common/features/simple_feature.cc ('k') | extensions/common/features/simple_feature_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/simple_feature_filter.h
diff --git a/extensions/common/features/simple_feature_filter.h b/extensions/common/features/simple_feature_filter.h
deleted file mode 100644
index 4f8a8c2e7bd26b5ae30c906eea4062205397d970..0000000000000000000000000000000000000000
--- a/extensions/common/features/simple_feature_filter.h
+++ /dev/null
@@ -1,64 +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 EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_FILTER_H_
-#define EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_FILTER_H_
-
-#include <string>
-
-#include "base/macros.h"
-#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,
- Manifest::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 // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_FILTER_H_
« no previous file with comments | « extensions/common/features/simple_feature.cc ('k') | extensions/common/features/simple_feature_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698