Index: chrome/installer/util/install_util.cc |
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc |
index d98a30b5037145aefa3fcc425c4044ab3cbb8e20..bb17c095efd49f2652d6c93f169689816d3598a7 100644 |
--- a/chrome/installer/util/install_util.cc |
+++ b/chrome/installer/util/install_util.cc |
@@ -39,6 +39,8 @@ using installer::ProductState; |
namespace { |
+const wchar_t kExperimentLabels[] = L"experiment_labels"; |
grt (UTC plus 2)
2012/11/24 02:58:37
Since this is a value defined by Omaha, please mov
SteveT
2012/11/26 20:45:06
Done.
|
+ |
const wchar_t kStageBinaryPatching[] = L"binary_patching"; |
const wchar_t kStageBuilding[] = L"building"; |
const wchar_t kStageConfiguringAutoLaunch[] = L"configuring_auto_launch"; |
@@ -519,6 +521,27 @@ string16 InstallUtil::GetCurrentDate() { |
return string16(date_str, len); |
} |
+// static |
+bool InstallUtil::SetOmahaExperimentLabel(const string16& experiment_label, |
grt (UTC plus 2)
2012/11/24 02:58:37
Upon further consideration, I think this belongs i
grt (UTC plus 2)
2012/11/24 03:03:44
Also, please add a test case to google_update_sett
SteveT
2012/11/26 20:45:06
Moved it.
SteveT
2012/11/26 20:45:06
Currently trying to understand the tests in google
|
+ bool system_install) { |
+ HKEY registry_hive = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
grt (UTC plus 2)
2012/11/24 02:58:37
nit: other code in the installer uses either the n
SteveT
2012/11/26 20:45:06
Done.
|
+ |
+ // Use the browser distribution and install level to write to the correct |
+ // client state/app guid key. |
+ bool success = false; |
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
+ if (dist->ShouldWriteExperimentLabels()) { |
+ string16 client_state_path( |
+ system_install ? dist->GetStateMediumKey() : dist->GetStateKey()); |
+ RegKey client_state( |
+ registry_hive, client_state_path.c_str(), KEY_SET_VALUE); |
+ success = client_state.WriteValue(kExperimentLabels, |
grt (UTC plus 2)
2012/11/24 03:03:44
It looks like Omaha deletes the value in the regis
SteveT
2012/11/26 20:45:06
Okay, done. The return value will also represent t
|
+ experiment_label.c_str()) == ERROR_SUCCESS; |
+ } |
+ |
+ return success; |
+} |
+ |
// Open |path| with minimal access to obtain information about it, returning |
// true and populating |handle| on success. |
// static |