Chromium Code Reviews| Index: chrome/installer/gcapi/gcapi_omaha_experiment.cc |
| diff --git a/chrome/installer/gcapi/gcapi_omaha_experiment.cc b/chrome/installer/gcapi/gcapi_omaha_experiment.cc |
| index 6b4b94e74a2a951894aa6721a8bc9cf683670118..cd38a7efce65fdba6a816107b96e1bfe13ff7322 100644 |
| --- a/chrome/installer/gcapi/gcapi_omaha_experiment.cc |
| +++ b/chrome/installer/gcapi/gcapi_omaha_experiment.cc |
| @@ -6,12 +6,13 @@ |
| #include "base/string16.h" |
| #include "base/stringprintf.h" |
| -#include "base/string_number_conversions.h" |
| +//#include "base/string_number_conversions.h" |
| #include "base/time.h" |
| #include "base/win/registry.h" |
| -#include "chrome/installer/util/browser_distribution.h" |
| -#include "chrome/installer/util/google_update_constants.h" |
| +//#include "chrome/installer/util/browser_distribution.h" |
| +//#include "chrome/installer/util/google_update_constants.h" |
|
robertshield
2012/11/20 15:29:49
should delete the commented includes
SteveT
2012/11/20 15:45:01
Oops, sorry. Was playing around with which were st
|
| #include "chrome/installer/gcapi/gcapi.h" |
| +#include "chrome/installer/util/install_util.h" |
| using base::Time; |
| using base::TimeDelta; |
| @@ -19,13 +20,6 @@ using base::win::RegKey; |
| namespace { |
| -const wchar_t kExperimentLabels[] = L"experiment_labels"; |
| - |
| -const wchar_t* kExperimentAppGuids[] = { |
| - L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}", |
| - L"{8A69D345-D564-463C-AFF1-A69D9E530F96}", |
| -}; |
| - |
| const wchar_t* kDays[] = |
| { L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" }; |
| @@ -74,7 +68,7 @@ int GetCurrentRlzWeek() { |
| } // namespace |
| -bool SetOmahaExperimentLabel(const wchar_t* brand_code, int shell_mode) { |
| +bool SetGCAPIOmahaExperimentLabel(const wchar_t* brand_code, int shell_mode) { |
| if (!brand_code) { |
| return false; |
| } |
| @@ -97,21 +91,5 @@ bool SetOmahaExperimentLabel(const wchar_t* brand_code, int shell_mode) { |
| week_number, |
| BuildOmahaExperimentDateString().c_str()); |
| - int successful_writes = 0; |
| - for (int i = 0; i < arraysize(kExperimentAppGuids); ++i) { |
| - string16 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.Valid()) { |
| - if (client_state.WriteValue(kExperimentLabels, |
| - experiment_label.c_str()) == ERROR_SUCCESS) { |
| - successful_writes++; |
| - } |
| - } |
| - } |
| - |
| - return (successful_writes == arraysize(kExperimentAppGuids)); |
| + return InstallUtil::SetOmahaExperimentLabel(experiment_label, registry_hive); |
| } |