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

Issue 136003008: [Variations] Read the policy from profile prefs if on Android (Closed)

Created:
6 years, 10 months ago by Mathieu
Modified:
6 years, 10 months ago
CC:
chromium-reviews, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org, jam
Visibility:
Public.

Description

[Variations] Read the policy from profile prefs if on Android BUG=342839 TEST=Manually tested with a User Policy file running on an Android build. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250859

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix #

Patch Set 3 : Add comments #

Patch Set 4 : Removing logging #

Total comments: 12

Patch Set 5 : addressed comments #

Total comments: 2

Patch Set 6 : fix tests #

Total comments: 2

Patch Set 7 : DCHECK #

Total comments: 2

Patch Set 8 : DCHECK (bis) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -10 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/metrics/variations/variations_service.h View 1 2 3 4 5 6 7 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/metrics/variations/variations_service.cc View 1 2 3 4 5 7 chunks +30 lines, -9 lines 0 comments Download
M chrome/browser/metrics/variations/variations_service_unittest.cc View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Joao da Silva
This looks reasonable to, just a comment inline. https://codereview.chromium.org/136003008/diff/1/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/136003008/diff/1/chrome/browser/chrome_browser_main.cc#newcode1487 chrome/browser/chrome_browser_main.cc:1487: variations_service->set_policy_pref_service(profile_->GetPrefs()); ...
6 years, 10 months ago (2014-01-28 14:19:35 UTC) #1
Mathieu
Thanks! https://codereview.chromium.org/136003008/diff/1/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/136003008/diff/1/chrome/browser/chrome_browser_main.cc#newcode1487 chrome/browser/chrome_browser_main.cc:1487: variations_service->set_policy_pref_service(profile_->GetPrefs()); On 2014/01/28 14:19:35, Joao da Silva wrote: ...
6 years, 10 months ago (2014-01-28 14:24:46 UTC) #2
Mathieu
Hi, I'm fairly confident this approach will work because I manually tested a User Policy. ...
6 years, 10 months ago (2014-02-10 22:02:55 UTC) #3
Alexei Svitkine (slow)
Looks good overall. Does this need a test, similar to the policy tests we have ...
6 years, 10 months ago (2014-02-10 22:12:47 UTC) #4
Mathieu
Thanks! Joao: How do you think this is best tested? I assume the policy team ...
6 years, 10 months ago (2014-02-10 22:41:33 UTC) #5
Joao da Silva
lgtm, nice work! I've manually verified that this is indeed working as intended. As for ...
6 years, 10 months ago (2014-02-11 16:19:42 UTC) #6
Joao da Silva
Maybe this is why the tests are crashing, see inline. https://codereview.chromium.org/136003008/diff/130001/chrome/browser/metrics/variations/variations_service.cc File chrome/browser/metrics/variations/variations_service.cc (right): https://codereview.chromium.org/136003008/diff/130001/chrome/browser/metrics/variations/variations_service.cc#newcode190 ...
6 years, 10 months ago (2014-02-11 16:28:33 UTC) #7
Mathieu
Thanks. Fixed the test. Alexei, have a look? https://codereview.chromium.org/136003008/diff/130001/chrome/browser/metrics/variations/variations_service.cc File chrome/browser/metrics/variations/variations_service.cc (right): https://codereview.chromium.org/136003008/diff/130001/chrome/browser/metrics/variations/variations_service.cc#newcode190 chrome/browser/metrics/variations/variations_service.cc:190: seed_store_(local_state), ...
6 years, 10 months ago (2014-02-11 18:02:46 UTC) #8
Alexei Svitkine (slow)
LGTM. Please file a crbug and set the BUG= on the description. https://codereview.chromium.org/136003008/diff/250001/chrome/browser/metrics/variations/variations_service.h File chrome/browser/metrics/variations/variations_service.h ...
6 years, 10 months ago (2014-02-11 18:10:20 UTC) #9
Mathieu
Thanks! Both 1-line approvals below: gab@: browser_prefs.cc jam@: chrome_browser_main.cc https://codereview.chromium.org/136003008/diff/250001/chrome/browser/metrics/variations/variations_service.h File chrome/browser/metrics/variations/variations_service.h (right): https://codereview.chromium.org/136003008/diff/250001/chrome/browser/metrics/variations/variations_service.h#newcode82 chrome/browser/metrics/variations/variations_service.h:82: ...
6 years, 10 months ago (2014-02-11 18:19:47 UTC) #10
gab
c/b/prefs lgtm https://codereview.chromium.org/136003008/diff/300001/chrome/browser/metrics/variations/variations_service.h File chrome/browser/metrics/variations/variations_service.h (right): https://codereview.chromium.org/136003008/diff/300001/chrome/browser/metrics/variations/variations_service.h#newcode83 chrome/browser/metrics/variations/variations_service.h:83: DCHECK(service != NULL); nit: DCHECK(service); is sufficient
6 years, 10 months ago (2014-02-11 20:31:46 UTC) #11
Mathieu
Thanks https://codereview.chromium.org/136003008/diff/300001/chrome/browser/metrics/variations/variations_service.h File chrome/browser/metrics/variations/variations_service.h (right): https://codereview.chromium.org/136003008/diff/300001/chrome/browser/metrics/variations/variations_service.h#newcode83 chrome/browser/metrics/variations/variations_service.h:83: DCHECK(service != NULL); On 2014/02/11 20:31:46, gab wrote: ...
6 years, 10 months ago (2014-02-11 20:38:02 UTC) #12
Mathieu
-jam (OOO), +sky 1 line change in chrome_browser_main needs approval, thanks!
6 years, 10 months ago (2014-02-12 16:56:39 UTC) #13
sky
LGTM
6 years, 10 months ago (2014-02-12 18:21:00 UTC) #14
Mathieu
The CQ bit was checked by mathp@chromium.org
6 years, 10 months ago (2014-02-12 18:27:41 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mathp@chromium.org/136003008/390001
6 years, 10 months ago (2014-02-12 18:29:21 UTC) #16
commit-bot: I haz the power
6 years, 10 months ago (2014-02-13 00:17:51 UTC) #17
Message was sent while issue was closed.
Change committed as 250859

Powered by Google App Engine
This is Rietveld 408576698