Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Issue 23579003: GCAPI should append to the existing experiment_labels instead of clobbering them. (Closed)

Created:
7 years, 3 months ago by gab
Modified:
7 years, 1 month ago
CC:
chromium-reviews, grt+watch_chromium.org, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org, macourteau
Visibility:
Public.

Description

GCAPI should append to the existing experiment_labels instead of clobbering them. As described on http://crbug.com/266955#c7 Also adding AtExitManager to gcapi_test.exe; this is required to support MasterPreferences's LazyInstance used by BrowserDistribution, used by google_update's ReadExperimentLabels(). Introducing GCAPITestRegistryOverrider as a class to be added as a member to GCAPI test fixtures that require registry overriding; extracted from the existing GCAPIReactivationTest fixture. Move Windows-specific variations_util.cc code to experiment_labels_win.cc BUG=266955 TEST=gcapi_test.exe Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233493

Patch Set 1 #

Patch Set 2 : check return value of ReadExperimentLabels #

Total comments: 3

Patch Set 3 : tweak + char16 + AtExitManager in tests #

Patch Set 4 : include string16.h #

Total comments: 14

Patch Set 5 : proper import name... #

Patch Set 6 : nits + use wchar_t with WideToUTF16 #

Patch Set 7 : Add tests and fix minor issues with impl. #

Patch Set 8 : Move Windows only variations_util code to variations_util_win #

Total comments: 16

Patch Set 9 : merge up to r232720 #

Patch Set 10 : review #

Patch Set 11 : review #

Total comments: 16

Patch Set 12 : review++ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+667 lines, -854 lines) Patch
M chrome/browser/metrics/variations/variations_registry_syncer_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_installer.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/common/metrics/variations/experiment_labels_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -67 lines 0 comments Download
A + chrome/common/metrics/variations/experiment_labels_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +106 lines, -161 lines 0 comments Download
A + chrome/common/metrics/variations/experiment_labels_win_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +192 lines, -274 lines 0 comments Download
M chrome/common/metrics/variations/variations_util.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/common/metrics/variations/variations_util.cc View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -87 lines 0 comments Download
M chrome/common/metrics/variations/variations_util_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -202 lines 0 comments Download
M chrome/installer/gcapi/gcapi_omaha_experiment.h View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/installer/gcapi/gcapi_omaha_experiment.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +71 lines, -24 lines 0 comments Download
A chrome/installer/gcapi/gcapi_omaha_experiment_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +180 lines, -0 lines 0 comments Download
M chrome/installer/gcapi/gcapi_reactivation_test.cc View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -16 lines 0 comments Download
M chrome/installer/gcapi/gcapi_test.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/installer/gcapi/gcapi_test_registry_overrider.h View 1 2 3 4 5 6 7 8 9 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/installer/gcapi/gcapi_test_registry_overrider.cc View 1 2 3 4 5 6 7 8 9 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/installer/util/google_update_constants.h View 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/installer/util/google_update_constants.cc View 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/installer/util/google_update_experiment_util.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/installer/util/google_update_experiment_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
gab
Robert/Alexei, PTAL. Thanks! Gab
7 years, 3 months ago (2013-08-29 22:10:53 UTC) #1
robertshield
https://codereview.chromium.org/23579003/diff/5001/chrome/common/metrics/variations/variations_util.cc File chrome/common/metrics/variations/variations_util.cc (left): https://codereview.chromium.org/23579003/diff/5001/chrome/common/metrics/variations/variations_util.cc#oldcode23 chrome/common/metrics/variations/variations_util.cc:23: const char kExperimentLabelSep[] = ";"; This has gone from ...
7 years, 3 months ago (2013-08-30 01:13:53 UTC) #2
Alexei Svitkine (slow)
https://codereview.chromium.org/23579003/diff/5001/chrome/common/metrics/variations/variations_util.cc File chrome/common/metrics/variations/variations_util.cc (left): https://codereview.chromium.org/23579003/diff/5001/chrome/common/metrics/variations/variations_util.cc#oldcode23 chrome/common/metrics/variations/variations_util.cc:23: const char kExperimentLabelSep[] = ";"; On 2013/08/30 01:13:53, robertshield ...
7 years, 3 months ago (2013-08-30 02:16:47 UTC) #3
gab
Done, will add tests to gcapi_tests tomorrow to test the new functionality. https://codereview.chromium.org/23579003/diff/5001/chrome/common/metrics/variations/variations_util.cc File chrome/common/metrics/variations/variations_util.cc ...
7 years, 3 months ago (2013-08-30 02:43:18 UTC) #4
Alexei Svitkine (slow)
https://codereview.chromium.org/23579003/diff/22001/chrome/common/metrics/variations/variations_util.cc File chrome/common/metrics/variations/variations_util.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/common/metrics/variations/variations_util.cc#newcode134 chrome/common/metrics/variations/variations_util.cc:134: labels, google_update::kExperimentLabelSep, &entries); Nit: wrap aligned base::SplitStringUsingSubstr(labels, google_update::kExperimentLabelSep, &entries); ...
7 years, 3 months ago (2013-08-30 14:17:18 UTC) #5
gab
Thanks, PTAL. https://codereview.chromium.org/23579003/diff/22001/chrome/common/metrics/variations/variations_util.cc File chrome/common/metrics/variations/variations_util.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/common/metrics/variations/variations_util.cc#newcode134 chrome/common/metrics/variations/variations_util.cc:134: labels, google_update::kExperimentLabelSep, &entries); On 2013/08/30 14:17:19, Alexei ...
7 years, 3 months ago (2013-08-30 17:53:10 UTC) #6
Alexei Svitkine (slow)
Thanks. Were you planning to write a test for this? https://codereview.chromium.org/23579003/diff/22001/chrome/installer/gcapi/gcapi_omaha_experiment.cc File chrome/installer/gcapi/gcapi_omaha_experiment.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/installer/gcapi/gcapi_omaha_experiment.cc#newcode45 ...
7 years, 3 months ago (2013-08-30 18:16:10 UTC) #7
Alexei Svitkine (slow)
Looks like you're getting link errors because on non-Windows platforms, installer code isn't included in ...
7 years, 3 months ago (2013-08-30 18:20:02 UTC) #8
gab
Added promised tests. Also extracted Windows specific code from variations_util.cc into variations_util_win.cc; this allows that ...
7 years, 3 months ago (2013-08-30 22:51:58 UTC) #9
gab
https://codereview.chromium.org/23579003/diff/22001/chrome/installer/gcapi/gcapi_omaha_experiment.cc File chrome/installer/gcapi/gcapi_omaha_experiment.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/installer/gcapi/gcapi_omaha_experiment.cc#newcode45 chrome/installer/gcapi/gcapi_omaha_experiment.cc:45: if (existing_label_begin != string16::npos) { On 2013/08/30 18:16:11, Alexei ...
7 years, 3 months ago (2013-08-30 22:57:14 UTC) #10
Alexei Svitkine (slow)
https://codereview.chromium.org/23579003/diff/22001/chrome/installer/util/google_update_constants.cc File chrome/installer/util/google_update_constants.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/installer/util/google_update_constants.cc#newcode12 chrome/installer/util/google_update_constants.cc:12: const char16 kExperimentLabelSep[] = L";"; On 2013/08/30 22:57:14, gab ...
7 years, 3 months ago (2013-09-03 15:46:35 UTC) #11
Alexei Svitkine (slow)
Gab, just wondering what's the status here?
7 years, 2 months ago (2013-10-08 13:05:57 UTC) #12
gab
The status is: - I was filling in for macourteau@ while he was on vacation ...
7 years, 2 months ago (2013-10-08 15:14:12 UTC) #13
Alexei Svitkine (slow)
On 2013/10/08 15:14:12, gab wrote: > The status is: > > - I was filling ...
7 years, 1 month ago (2013-11-01 15:39:41 UTC) #14
gab
Hello Robert/Alexei, refactoring completed as requested; PTAL. Thanks! Gab https://codereview.chromium.org/23579003/diff/22001/chrome/installer/util/google_update_constants.cc File chrome/installer/util/google_update_constants.cc (right): https://codereview.chromium.org/23579003/diff/22001/chrome/installer/util/google_update_constants.cc#newcode12 chrome/installer/util/google_update_constants.cc:12: ...
7 years, 1 month ago (2013-11-05 22:20:37 UTC) #15
Alexei Svitkine (slow)
Thanks for picking this up again! Looks good generally with a few more comments. https://codereview.chromium.org/23579003/diff/388001/chrome/chrome_tests_unit.gypi ...
7 years, 1 month ago (2013-11-05 23:05:23 UTC) #16
gab
Thanks, PTAL. Cheers, Gab https://codereview.chromium.org/23579003/diff/388001/chrome/chrome_tests_unit.gypi File chrome/chrome_tests_unit.gypi (right): https://codereview.chromium.org/23579003/diff/388001/chrome/chrome_tests_unit.gypi#newcode1846 chrome/chrome_tests_unit.gypi:1846: 'common/metrics/variations/experiment_labels_win_unittest.cc', On 2013/11/05 23:05:23, Alexei ...
7 years, 1 month ago (2013-11-06 16:39:09 UTC) #17
Alexei Svitkine (slow)
LGTM! https://codereview.chromium.org/23579003/diff/388001/chrome/chrome_tests_unit.gypi File chrome/chrome_tests_unit.gypi (right): https://codereview.chromium.org/23579003/diff/388001/chrome/chrome_tests_unit.gypi#newcode1846 chrome/chrome_tests_unit.gypi:1846: 'common/metrics/variations/experiment_labels_win_unittest.cc', On 2013/11/06 16:39:10, gab wrote: > On ...
7 years, 1 month ago (2013-11-06 22:45:04 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/23579003/558001
7 years, 1 month ago (2013-11-06 23:08:23 UTC) #19
commit-bot: I haz the power
Change committed as 233493
7 years, 1 month ago (2013-11-07 06:04:32 UTC) #20
rohitrao (ping after 24h)
Hi all, I initially moved BuildGoogleUpdateExperimentLabel() into variations_util.h because we needed to use it on ...
7 years, 1 month ago (2013-11-08 15:18:09 UTC) #21
gab
On 2013/11/08 15:18:09, rohitrao wrote: > Hi all, > > I initially moved BuildGoogleUpdateExperimentLabel() into ...
7 years, 1 month ago (2013-11-08 15:22:17 UTC) #22
Alexei Svitkine (slow)
On 2013/11/08 15:18:09, rohitrao wrote: > Hi all, > > I initially moved BuildGoogleUpdateExperimentLabel() into ...
7 years, 1 month ago (2013-11-08 15:22:40 UTC) #23
stuartmorgan
7 years, 1 month ago (2013-11-08 15:39:15 UTC) #24
Message was sent while issue was closed.
On 2013/11/08 15:22:40, Alexei Svitkine wrote:
> Sorry for the breakage - too bad the relevant iOS code isn't upstreamed - else
> the bots would have presumably told us of this breakage before it happened.

The decision made by Chrome leadership after extensive discussion was that we
should no longer upstream into chrome/, and instead move all shared code into
layered components. This is an *enormous* undertaking, so unsurprisingly it's
taking a long time. It is unfortunate in cases like this, yes, but we all have
to live with the reality that this kind of thing will happen, and need to be
unwound again, in the meantime.

Powered by Google App Engine
This is Rietveld 408576698