Index: chrome/common/extensions/features/feature_channel.cc |
diff --git a/chrome/common/extensions/features/feature_channel.cc b/chrome/common/extensions/features/feature_channel.cc |
index 98a178ef375f00117e7e00767029cc2218195bc1..e1cce9f61540321ca0a8a59d12603570534f699c 100644 |
--- a/chrome/common/extensions/features/feature_channel.cc |
+++ b/chrome/common/extensions/features/feature_channel.cc |
@@ -27,4 +27,14 @@ VersionInfo::Channel GetDefaultChannel() { |
return kDefaultChannel; |
} |
+ScopedCurrentChannel::ScopedCurrentChannel(VersionInfo::Channel channel) |
+ : original_channel_(VersionInfo::CHANNEL_UNKNOWN) { |
+ original_channel_ = GetCurrentChannel(); |
+ SetCurrentChannel(channel); |
+} |
+ |
+ScopedCurrentChannel::~ScopedCurrentChannel() { |
+ SetCurrentChannel(original_channel_); |
+} |
+ |
} // namespace extensions |