OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // archive_type: tells whether this is incremental install or not. | 211 // archive_type: tells whether this is incremental install or not. |
212 // install_return_code: if 0, means installation was successful. | 212 // install_return_code: if 0, means installation was successful. |
213 // value: current value of Google Update "ap" key. | 213 // value: current value of Google Update "ap" key. |
214 // Returns true if |value| is modified. | 214 // Returns true if |value| is modified. |
215 static bool UpdateGoogleUpdateApKey(installer::ArchiveType archive_type, | 215 static bool UpdateGoogleUpdateApKey(installer::ArchiveType archive_type, |
216 int install_return_code, | 216 int install_return_code, |
217 installer::ChannelInfo* value); | 217 installer::ChannelInfo* value); |
218 | 218 |
219 // This method updates the values that report how many profiles are in use | 219 // This method updates the values that report how many profiles are in use |
220 // and how many of those are signed-in. | 220 // and how many of those are signed-in. |
221 static void UpdateProfileCounts(int profiles_active, int profiles_signedin); | 221 static void UpdateProfileCounts(size_t profiles_active, |
| 222 size_t profiles_signedin); |
222 | 223 |
223 // For system-level installs, we need to be able to communicate the results | 224 // For system-level installs, we need to be able to communicate the results |
224 // of the Toast Experiments back to Google Update. The problem is just that | 225 // of the Toast Experiments back to Google Update. The problem is just that |
225 // the experiment is run in the context of the user, which doesn't have | 226 // the experiment is run in the context of the user, which doesn't have |
226 // write access to the HKLM key that Google Update expects the results in. | 227 // write access to the HKLM key that Google Update expects the results in. |
227 // However, when we are about to switch contexts from system to user, we can | 228 // However, when we are about to switch contexts from system to user, we can |
228 // duplicate the handle to the registry key and pass it (through handle | 229 // duplicate the handle to the registry key and pass it (through handle |
229 // inheritance) to the newly created child process that is launched as the | 230 // inheritance) to the newly created child process that is launched as the |
230 // user, allowing the child process to write to the key, with the | 231 // user, allowing the child process to write to the key, with the |
231 // WriteGoogleUpdateSystemClientKey function below. | 232 // WriteGoogleUpdateSystemClientKey function below. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // this will do nothing to |experiment_labels|. This will return true if the | 314 // this will do nothing to |experiment_labels|. This will return true if the |
314 // label did not exist, or was successfully read. | 315 // label did not exist, or was successfully read. |
315 static bool ReadExperimentLabels(bool system_install, | 316 static bool ReadExperimentLabels(bool system_install, |
316 base::string16* experiment_labels); | 317 base::string16* experiment_labels); |
317 | 318 |
318 private: | 319 private: |
319 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); | 320 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); |
320 }; | 321 }; |
321 | 322 |
322 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 323 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
OLD | NEW |