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

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

Issue 22299009: Move channel-related (Chrome-specific) global state out of Feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/feature.h
diff --git a/chrome/common/extensions/features/feature.h b/chrome/common/extensions/features/feature.h
index b43dd06c564adbb757be030c39b0d6ebba680518..5a9206174ec633bdc97ae6adc91771b3be03baa9 100644
--- a/chrome/common/extensions/features/feature.h
+++ b/chrome/common/extensions/features/feature.h
@@ -9,7 +9,6 @@
#include <string>
#include "base/values.h"
-#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/manifest.h"
@@ -95,34 +94,6 @@ class Feature {
static Availability CreateAvailability(AvailabilityResult result,
const std::string& message);
- // Gets the current channel as seen by the Feature system.
- static chrome::VersionInfo::Channel GetCurrentChannel();
-
- // Sets the current channel as seen by the Feature system. In the browser
- // process this should be chrome::VersionInfo::GetChannel(), and in the
- // renderer this will need to come from an IPC.
- static void SetCurrentChannel(chrome::VersionInfo::Channel channel);
-
- // Gets the default channel as seen by the Feature system.
- static chrome::VersionInfo::Channel GetDefaultChannel();
-
- // Scoped channel setter. Use for tests.
- class ScopedCurrentChannel {
- public:
- explicit ScopedCurrentChannel(chrome::VersionInfo::Channel channel)
- : original_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN) {
- original_channel_ = GetCurrentChannel();
- SetCurrentChannel(channel);
- }
-
- ~ScopedCurrentChannel() {
- SetCurrentChannel(original_channel_);
- }
-
- private:
- chrome::VersionInfo::Channel original_channel_;
- };
-
const std::string& name() const { return name_; }
void set_name(const std::string& name) { name_ = name; }
const std::set<std::string>& dependencies() { return dependencies_; }
« no previous file with comments | « chrome/common/extensions/features/complex_feature_unittest.cc ('k') | chrome/common/extensions/features/feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698