Index: chrome/install_static/install_util.cc |
diff --git a/chrome/install_static/install_util.cc b/chrome/install_static/install_util.cc |
index 368692352ac108ab29ad493d8b324e85d8c9c793..7a54c7196a1ea001a008cc90e31fa8fe3415c316 100644 |
--- a/chrome/install_static/install_util.cc |
+++ b/chrome/install_static/install_util.cc |
@@ -20,6 +20,7 @@ |
#include "chrome/install_static/policy_path_parser.h" |
#include "chrome/install_static/user_data_dir.h" |
#include "chrome_elf/nt_registry/nt_registry.h" |
+#include "components/version_info/channel.h" |
namespace install_static { |
@@ -561,6 +562,26 @@ void GetExecutableVersionDetails(const std::wstring& exe_path, |
*channel_name = GetChromeChannelName(); |
} |
+version_info::Channel GetChromeChannel() { |
+#if defined(GOOGLE_CHROME_BUILD) |
+ std::wstring channel_name(GetChromeChannelName()); |
+ if (channel_name.empty()) { |
+ return version_info::Channel::STABLE; |
+ } |
+ if (channel_name == L"beta") { |
+ return version_info::Channel::BETA; |
+ } |
+ if (channel_name == L"dev") { |
+ return version_info::Channel::DEV; |
+ } |
+ if (channel_name == L"canary") { |
+ return version_info::Channel::CANARY; |
+ } |
+#endif |
+ |
+ return version_info::Channel::UNKNOWN; |
+} |
+ |
std::wstring GetChromeChannelName() { |
return InstallDetails::Get().channel(); |
} |