Move version_info into //base
This is a step to move version_info from //components into //base,
which is a dependency of cached feature flags which is also getting
moved to //base.
//components/version_info is left as a facade of //base/version_info.
This CL leaves two copies of Channel.java, one in //components
(copy of the auto-generated) and one in //base (auto-generated),
in order to perform the migration to //base downstream. Soon after,
https://crrev/c/5142488 will delete
//components/version_info/.../Channel.java. I cannot do it on the same
CL because of the Java @interface Channel which cannot easily be made
into a facade. The upstream references are migrated in this same CL.
Bug: 1515661
Change-Id: Ibc4e1ccbd067f71afad793a8b7505797b545337e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5147768
Code-Coverage: [email protected] <[email protected]>
Reviewed-by: Richard (Torne) Coles <[email protected]>
Commit-Queue: Henrique Nakashima <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1243557}
diff --git a/components/version_info/channel.h b/components/version_info/channel.h
index 714bd7b2..63b53e7 100644
--- a/components/version_info/channel.h
+++ b/components/version_info/channel.h
@@ -5,43 +5,6 @@
#ifndef COMPONENTS_VERSION_INFO_CHANNEL_H_
#define COMPONENTS_VERSION_INFO_CHANNEL_H_
-#include <string_view>
-
-#include "base/notreached.h"
-
-namespace version_info {
-
-// The possible channels for an installation, from most fun to most stable.
-// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.version_info
-enum class Channel {
- UNKNOWN = 0,
- // DEFAULT is an alias for UNKNOWN because the build files use DEFAULT but the
- // code uses UNKNOWN. TODO(paulmiller): Combine DEFAULT & UNKNOWN.
- DEFAULT = UNKNOWN,
- CANARY = 1,
- DEV = 2,
- BETA = 3,
- STABLE = 4,
-};
-
-// Returns a string equivalent of |channel|, independent of whether the build
-// is branded or not and without any additional modifiers.
-constexpr std::string_view GetChannelString(Channel channel) {
- switch (channel) {
- case Channel::STABLE:
- return "stable";
- case Channel::BETA:
- return "beta";
- case Channel::DEV:
- return "dev";
- case Channel::CANARY:
- return "canary";
- case Channel::UNKNOWN:
- return "unknown";
- }
- NOTREACHED_NORETURN();
-}
-
-} // namespace version_info
+#include "base/version_info/channel.h"
#endif // COMPONENTS_VERSION_INFO_CHANNEL_H_