OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/install_static/product_install_details.h" | 5 #include "chrome/install_static/product_install_details.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::unique_ptr<PrimaryInstallDetails> MakeProductDetails( | 121 std::unique_ptr<PrimaryInstallDetails> MakeProductDetails( |
122 const std::wstring& exe_path) { | 122 const std::wstring& exe_path) { |
123 std::unique_ptr<PrimaryInstallDetails> details(new PrimaryInstallDetails()); | 123 std::unique_ptr<PrimaryInstallDetails> details(new PrimaryInstallDetails()); |
124 | 124 |
125 const InstallConstants* mode = FindInstallMode(GetInstallSuffix(exe_path)); | 125 const InstallConstants* mode = FindInstallMode(GetInstallSuffix(exe_path)); |
126 const bool system_level = | 126 const bool system_level = |
127 mode->supports_system_level && PathIsInProgramFiles(exe_path); | 127 mode->supports_system_level && PathIsInProgramFiles(exe_path); |
128 | 128 |
129 details->set_mode(mode); | 129 details->set_mode(mode); |
130 details->set_system_level(system_level); | 130 details->set_system_level(system_level); |
131 details->set_channel(DetermineChannel(*mode, system_level)); | 131 |
| 132 // Cache the ap and cohort name values found in the registry for use in crash |
| 133 // keys and in about:version. |
| 134 std::wstring update_ap; |
| 135 std::wstring update_cohort_name; |
| 136 details->set_channel(DetermineChannel(*mode, system_level, |
| 137 false /* !from_binaries */, &update_ap, |
| 138 &update_cohort_name)); |
| 139 details->set_update_ap(update_ap); |
| 140 details->set_update_cohort_name(update_cohort_name); |
132 | 141 |
133 return details; | 142 return details; |
134 } | 143 } |
135 | 144 |
136 } // namespace install_static | 145 } // namespace install_static |
OLD | NEW |