Chromium Code Reviews| Index: chrome/install_static/install_details.cc |
| diff --git a/chrome/install_static/install_details.cc b/chrome/install_static/install_details.cc |
| index 8384b31214ebbd197e99d3cfac7ab500e5024e51..185f8d3c779cce08a4720080241dba0560bb424b 100644 |
| --- a/chrome/install_static/install_details.cc |
| +++ b/chrome/install_static/install_details.cc |
| @@ -12,6 +12,7 @@ |
| #include "chrome/install_static/install_modes.h" |
| #include "chrome/install_static/install_util.h" |
| #include "chrome_elf/nt_registry/nt_registry.h" |
| +#include "components/version_info/channel.h" |
| #include "components/version_info/version_info_values.h" |
| namespace install_static { |
| @@ -26,6 +27,23 @@ const InstallDetails* g_module_details = nullptr; |
| } // namespace |
| +version_info::Channel InstallDetails::GetChannel() const { |
|
grt (UTC plus 2)
2017/04/06 10:12:22
i think this interpretation of the channel string
|
| +#if defined(GOOGLE_CHROME_BUILD) |
| + std::wstring channel(channel()); |
| + if (channel.empty()) { |
| + return version_info::Channel::STABLE; |
| + } else if (channel == L"beta") { |
| + return version_info::Channel::BETA; |
| + } else if (channel == L"dev") { |
| + return version_info::Channel::DEV; |
| + } else if (channel == L"canary") { |
| + return version_info::Channel::CANARY; |
| + } |
| +#endif |
| + |
| + return version_info::Channel::UNKNOWN; |
| +} |
| + |
| std::wstring InstallDetails::GetClientStateKeyPath() const { |
| return install_static::GetClientStateKeyPath(app_guid()); |
| } |