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/chrome_version_info.h" | 5 #include "chrome/common/chrome_version_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" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "chrome/installer/util/google_update_settings.h" | 12 #include "chrome/installer/util/google_update_settings.h" |
13 #include "chrome/installer/util/install_util.h" | 13 #include "chrome/installer/util/install_util.h" |
14 | 14 |
15 namespace chrome { | 15 namespace chrome { |
16 | 16 |
17 // static | 17 // static |
18 std::string VersionInfo::GetVersionStringModifier() { | 18 std::string VersionInfo::GetVersionStringModifier() { |
19 #if defined(GOOGLE_CHROME_BUILD) | 19 #if defined(GOOGLE_CHROME_BUILD) |
20 base::FilePath module; | 20 base::FilePath module; |
21 string16 channel; | 21 string16 channel; |
22 if (PathService::Get(base::FILE_MODULE, &module)) { | 22 if (PathService::Get(base::FILE_MODULE, &module)) { |
23 bool is_system_install = | 23 bool is_system_install = |
24 !InstallUtil::IsPerUserInstall(module.value().c_str()); | 24 !InstallUtil::IsPerUserInstall(module.value().c_str()); |
25 | 25 |
26 GoogleUpdateSettings::GetChromeChannelAndModifiers(is_system_install, | 26 GoogleUpdateSettings::GetChromeChannelAndModifiers(is_system_install, |
27 &channel); | 27 &channel); |
28 } | 28 } |
29 #if defined(USE_AURA) | |
30 channel += L" Aura"; | |
31 #endif | |
32 #if defined(ADDRESS_SANITIZER) | 29 #if defined(ADDRESS_SANITIZER) |
33 if (base::debug::IsBinaryInstrumented()) | 30 if (base::debug::IsBinaryInstrumented()) |
34 channel += L" SyzyASan"; | 31 channel += L" SyzyASan"; |
35 #endif | 32 #endif |
36 return UTF16ToASCII(channel); | 33 return UTF16ToASCII(channel); |
37 #else | 34 #else |
38 return std::string(); | 35 return std::string(); |
39 #endif | 36 #endif |
40 } | 37 } |
41 | 38 |
(...skipping 17 matching lines...) Expand all Loading... |
59 return CHANNEL_DEV; | 56 return CHANNEL_DEV; |
60 } else if (channel == L"canary") { | 57 } else if (channel == L"canary") { |
61 return CHANNEL_CANARY; | 58 return CHANNEL_CANARY; |
62 } | 59 } |
63 #endif | 60 #endif |
64 | 61 |
65 return CHANNEL_UNKNOWN; | 62 return CHANNEL_UNKNOWN; |
66 } | 63 } |
67 | 64 |
68 } // namespace chrome | 65 } // namespace chrome |
OLD | NEW |