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

Unified Diff: chrome/common/extensions/features/feature_channel.cc

Issue 661593005: Build a few more extensions files only when extensions are enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « chrome/common/extensions/features/feature_channel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/common/extensions/features/feature_channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698