| Index: chrome/installer/util/install_util.cc
|
| diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
|
| index db710d47d9f85fb116098574e5d5bca6a9f4be7f..628e44af2e7b549148e468c86b19d18644b8ee7a 100644
|
| --- a/chrome/installer/util/install_util.cc
|
| +++ b/chrome/installer/util/install_util.cc
|
| @@ -38,6 +38,13 @@ using installer::ProductState;
|
|
|
| namespace {
|
|
|
| +const wchar_t* kExperimentAppGuids[] = {
|
| + L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}",
|
| + L"{8A69D345-D564-463C-AFF1-A69D9E530F96}",
|
| +};
|
| +
|
| +const wchar_t kExperimentLabels[] = L"experiment_labels";
|
| +
|
| const wchar_t kStageBinaryPatching[] = L"binary_patching";
|
| const wchar_t kStageBuilding[] = L"building";
|
| const wchar_t kStageConfiguringAutoLaunch[] = L"configuring_auto_launch";
|
| @@ -523,6 +530,27 @@ string16 InstallUtil::GetCurrentDate() {
|
| return string16(date_str, len);
|
| }
|
|
|
| +// static
|
| +bool InstallUtil::SetOmahaExperimentLabel(const string16& experiment_label,
|
| + HKEY registry_hive) {
|
| + size_t successful_writes = 0;
|
| + string16 experiment_path;
|
| + for (size_t i = 0; i < arraysize(kExperimentAppGuids); ++i) {
|
| + experiment_path = google_update::kRegPathClientState;
|
| + experiment_path += L"\\";
|
| + experiment_path += kExperimentAppGuids[i];
|
| +
|
| + RegKey client_state(registry_hive, experiment_path.c_str(),
|
| + KEY_SET_VALUE);
|
| + if (client_state.WriteValue(kExperimentLabels,
|
| + experiment_label.c_str()) == ERROR_SUCCESS) {
|
| + ++successful_writes;
|
| + }
|
| + }
|
| +
|
| + return (successful_writes == arraysize(kExperimentAppGuids));
|
| +}
|
| +
|
| // Open |path| with minimal access to obtain information about it, returning
|
| // true and populating |handle| on success.
|
| // static
|
|
|