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

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

Issue 801603002: Add support for command line switches to Features, and as proof that it works, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixes Created 6 years 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: extensions/common/features/feature.h
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h
index 0300ed03e5bf5216ef65e6612f9bae308c597a44..6d3c8c5f3fc566f3ee16adca66a9d116ee0f4e3e 100644
--- a/extensions/common/features/feature.h
+++ b/extensions/common/features/feature.h
@@ -73,6 +73,7 @@ class Feature {
NOT_PRESENT,
UNSUPPORTED_CHANNEL,
FOUND_IN_BLACKLIST,
+ MISSING_COMMAND_LINE_SWITCH,
};
// Container for AvailabiltyResult that also exposes a user-visible error
@@ -149,6 +150,17 @@ class Feature {
const GURL& url,
Context context) const = 0;
+ // Returns true if the feature is available to the current environment,
+ // without needing to know information about an Extension or any other
+ // contextual information. Typically used when the Feature is purely
+ // configured by command line flags and/or Chrome channel.
+ //
+ // Generally try not to use this function. Even if you don't think a Feature
+ // relies on an Extension now - maybe it will, one day, so if there's an
+ // Extension available (or a runtime context, etc) then use the more targeted
+ // method instead.
+ Availability IsAvailableToEnvironment() const;
+
virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0;
virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0;

Powered by Google App Engine
This is Rietveld 408576698