Index: extensions/common/features/feature_channel.h |
diff --git a/extensions/common/features/feature_channel.h b/extensions/common/features/feature_channel.h |
index 5533e5d588ce5f6226992202997c65112ecf9350..8807132c0037c4bb0e993b81b06127abd5ef1b2c 100644 |
--- a/extensions/common/features/feature_channel.h |
+++ b/extensions/common/features/feature_channel.h |
@@ -16,22 +16,24 @@ namespace extensions { |
// Gets the current channel as seen by the Feature system. |
version_info::Channel GetCurrentChannel(); |
-// Sets the current channel as seen by the Feature system. In the browser |
-// process this should be chrome::GetChannel(), and in the renderer this will |
-// need to come from an IPC. |
+// Sets the current channel as seen by the Feature system, unless the channel is |
+// currently set through |ScopedCurrentChannel|. In the browser process this |
+// should be chrome::GetChannel(), and in the renderer this will need to come |
+// from an IPC. |
void SetCurrentChannel(version_info::Channel channel); |
-// Gets the default channel as seen by the Feature system. |
-version_info::Channel GetDefaultChannel(); |
- |
// Scoped channel setter. Use for tests. |
+// Note that the lifetimes of multiple instances of this class must be disjoint |
+// or nested, but never overlapping. |
class ScopedCurrentChannel { |
public: |
explicit ScopedCurrentChannel(version_info::Channel channel); |
~ScopedCurrentChannel(); |
private: |
- version_info::Channel original_channel_; |
+ const version_info::Channel channel_; |
+ const version_info::Channel original_overridden_channel_; |
+ const bool original_channel_is_overridden_; |
DISALLOW_COPY_AND_ASSIGN(ScopedCurrentChannel); |
}; |