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

Side by Side Diff: chrome/common/extensions/features/feature_channel.h

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_
6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_ 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_
7 7
8 #include "chrome/common/chrome_version_info.h" 8 #include "base/macros.h"
9
10 namespace version_info {
11 enum class Channel;
12 }
9 13
10 namespace extensions { 14 namespace extensions {
11 15
12 // Gets the current channel as seen by the Feature system. 16 // Gets the current channel as seen by the Feature system.
13 version_info::Channel GetCurrentChannel(); 17 version_info::Channel GetCurrentChannel();
14 18
15 // Sets the current channel as seen by the Feature system. In the browser 19 // Sets the current channel as seen by the Feature system. In the browser
16 // process this should be chrome::VersionInfo::GetChannel(), and in the 20 // process this should be chrome::GetChannel(), and in the renderer this will
17 // renderer this will need to come from an IPC. 21 // need to come from an IPC.
18 void SetCurrentChannel(version_info::Channel channel); 22 void SetCurrentChannel(version_info::Channel channel);
19 23
20 // Gets the default channel as seen by the Feature system. 24 // Gets the default channel as seen by the Feature system.
21 version_info::Channel GetDefaultChannel(); 25 version_info::Channel GetDefaultChannel();
22 26
23 // Scoped channel setter. Use for tests. 27 // Scoped channel setter. Use for tests.
24 class ScopedCurrentChannel { 28 class ScopedCurrentChannel {
25 public: 29 public:
26 explicit ScopedCurrentChannel(version_info::Channel channel); 30 explicit ScopedCurrentChannel(version_info::Channel channel);
27 ~ScopedCurrentChannel(); 31 ~ScopedCurrentChannel();
28 32
29 private: 33 private:
30 version_info::Channel original_channel_; 34 version_info::Channel original_channel_;
31 35
32 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentChannel); 36 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentChannel);
33 }; 37 };
34 38
35 } // namespace extensions 39 } // namespace extensions
36 40
37 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_ 41 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698