Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/common/channel_info.h" | 5 #include "chrome/common/channel_info.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/debug/profiler.h" | 8 #include "base/debug/profiler.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 // fixed. | 22 // fixed. |
| 23 tracked_objects::ScopedTracker tracking_profile( | 23 tracked_objects::ScopedTracker tracking_profile( |
| 24 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 24 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 25 "422460 VersionInfo::GetVersionStringModifier")); | 25 "422460 VersionInfo::GetVersionStringModifier")); |
| 26 | 26 |
| 27 #if defined(GOOGLE_CHROME_BUILD) | 27 #if defined(GOOGLE_CHROME_BUILD) |
| 28 base::FilePath module; | 28 base::FilePath module; |
| 29 base::string16 channel; | 29 base::string16 channel; |
| 30 if (PathService::Get(base::FILE_MODULE, &module)) { | 30 if (PathService::Get(base::FILE_MODULE, &module)) { |
| 31 bool is_system_install = !InstallUtil::IsPerUserInstall(module); | 31 bool is_system_install = !InstallUtil::IsPerUserInstall(module); |
| 32 GoogleUpdateSettings::GetChromeChannelAndModifiers(is_system_install, | 32 channel = GoogleUpdateSettings::GetChromeChannel(is_system_install); |
| 33 &channel); | |
| 34 } | 33 } |
| 35 #if defined(SYZYASAN) | 34 #if defined(SYZYASAN) |
| 36 if (base::debug::IsBinaryInstrumented()) | 35 if (base::debug::IsBinaryInstrumented()) |
| 37 channel += L" SyzyASan"; | 36 channel += L" SyzyASan"; |
|
Sébastien Marchand
2017/01/09 20:41:22
Should this go in the "if (PathService::Get(base::
grt (UTC plus 2)
2017/01/09 20:49:51
Hmm. Having it out here means that " SyzyAsan" wil
Sébastien Marchand
2017/01/09 20:56:14
Ha yeah sorry, my question didn't really make sens
| |
| 38 #endif | 37 #endif |
| 39 return base::UTF16ToASCII(channel); | 38 return base::UTF16ToASCII(channel); |
| 40 #else | 39 #else |
| 41 return std::string(); | 40 return std::string(); |
| 42 #endif | 41 #endif |
| 43 } | 42 } |
| 44 | 43 |
| 45 version_info::Channel GetChannel() { | 44 version_info::Channel GetChannel() { |
| 46 #if defined(GOOGLE_CHROME_BUILD) | 45 #if defined(GOOGLE_CHROME_BUILD) |
| 47 std::wstring channel(L"unknown"); | 46 std::wstring channel(L"unknown"); |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 60 return version_info::Channel::DEV; | 59 return version_info::Channel::DEV; |
| 61 } else if (channel == L"canary") { | 60 } else if (channel == L"canary") { |
| 62 return version_info::Channel::CANARY; | 61 return version_info::Channel::CANARY; |
| 63 } | 62 } |
| 64 #endif | 63 #endif |
| 65 | 64 |
| 66 return version_info::Channel::UNKNOWN; | 65 return version_info::Channel::UNKNOWN; |
| 67 } | 66 } |
| 68 | 67 |
| 69 } // namespace chrome | 68 } // namespace chrome |
| OLD | NEW |