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

Issue 2801173002: arc: Provide API to control Play Store state from autotests (Closed)

Created:
3 years, 8 months ago by khmel
Modified:
3 years, 8 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org, stevenjb
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: Provide API to control Play Store state from autotests This provides required API to read and set Play Store state from autotests since old settings page will deprecate soon and new MD settings don't provide reliable way to access Play Store settings. BUG=694081 TEST=Manually, together with https://chromium-review.googlesource.com/c/470707/ Review-Url: https://codereview.chromium.org/2801173002 Cr-Commit-Position: refs/heads/master@{#464735} Committed: https://chromium.googlesource.com/chromium/src/+/d127ade1e89dd1b221e85170e0dbe4c32072c7c5

Patch Set 1 #

Patch Set 2 : fix browser test #

Total comments: 8

Patch Set 3 : handle attempt to enabled policy disabled ARC, nits #

Total comments: 2

Patch Set 4 : use callbacks instead of direct return #

Total comments: 14

Patch Set 5 : js functions updated #

Patch Set 6 : changed JS API from isEnabled/Managed to getState #

Total comments: 7

Patch Set 7 : make enabled/managed optional fields #

Total comments: 2

Patch Set 8 : nit #

Total comments: 10

Patch Set 9 : use generated structs instead of direct access #

Patch Set 10 : return boolean for SetArcPlayStoreEnabledForProfile #

Total comments: 12

Patch Set 11 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -5 lines) Patch
M chrome/browser/chromeos/arc/arc_util.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/autotest_private/autotest_private_api.h View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/autotest_private/autotest_private_api.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +41 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/autotest_private.idl View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/autotest_private/test.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -0 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (27 generated)
khmel
Hi, PTAL Thanks!
3 years, 8 months ago (2017-04-07 00:07:18 UTC) #7
Ilya Sherman
histograms.xml lgtm
3 years, 8 months ago (2017-04-07 01:15:01 UTC) #12
Luis Héctor Chávez
https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode388 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:388: Profile* profile = ProfileManager::GetActiveUserProfile(); qq: is Profile* guaranteed to ...
3 years, 8 months ago (2017-04-07 01:57:51 UTC) #13
Luis Héctor Chávez
https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode415 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:415: if (arc::IsArcAllowedForProfile(profile)) Do you also want the semantics of ...
3 years, 8 months ago (2017-04-07 02:01:53 UTC) #14
khmel
Thank you for reviewing and comments, PTAL updated version https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/20001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode388 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:388: ...
3 years, 8 months ago (2017-04-07 15:52:45 UTC) #17
Luis Héctor Chávez
https://codereview.chromium.org/2801173002/diff/40001/chrome/browser/chromeos/arc/arc_util.cc File chrome/browser/chromeos/arc/arc_util.cc (right): https://codereview.chromium.org/2801173002/diff/40001/chrome/browser/chromeos/arc/arc_util.cc#newcode118 chrome/browser/chromeos/arc/arc_util.cc:118: if (enabled && !IsArcPlayStoreEnabledForProfile(profile)) { IIUC (but I'm not ...
3 years, 8 months ago (2017-04-07 16:09:05 UTC) #18
khmel
it seems direct return is not allowed and only one valid way to return via ...
3 years, 8 months ago (2017-04-07 19:23:19 UTC) #23
Luis Héctor Chávez
https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/chromeos/arc/arc_util.cc File chrome/browser/chromeos/arc/arc_util.cc (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/chromeos/arc/arc_util.cc#newcode118 chrome/browser/chromeos/arc/arc_util.cc:118: if (enabled && !IsArcPlayStoreEnabledForProfile(profile)) { nit: This should be ...
3 years, 8 months ago (2017-04-07 22:30:11 UTC) #24
khmel
https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/chromeos/arc/arc_util.cc File chrome/browser/chromeos/arc/arc_util.cc (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/chromeos/arc/arc_util.cc#newcode118 chrome/browser/chromeos/arc/arc_util.cc:118: if (enabled && !IsArcPlayStoreEnabledForProfile(profile)) { On 2017/04/07 22:30:11, Luis ...
3 years, 8 months ago (2017-04-07 22:32:09 UTC) #25
Finnur
I'm probably borderline on even reviewing changes to existing extensions code, but new APIs should ...
3 years, 8 months ago (2017-04-10 15:41:39 UTC) #27
Devlin
I don't have a ton of context here; stevenjb@, does this look right to you? ...
3 years, 8 months ago (2017-04-10 21:53:55 UTC) #28
stevenjb
https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode417 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:417: was_enabled = arc::IsArcPlayStoreEnabledForProfile(profile); I think this should probably be: ...
3 years, 8 months ago (2017-04-11 15:58:56 UTC) #30
khmel
Thank you for your comments. PTAL updated version https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl File chrome/common/extensions/api/autotest_private.idl (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl#newcode65 chrome/common/extensions/api/autotest_private.idl:65: callback ...
3 years, 8 months ago (2017-04-11 21:16:28 UTC) #31
stevenjb
https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl File chrome/common/extensions/api/autotest_private.idl (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl#newcode126 chrome/common/extensions/api/autotest_private.idl:126: static void isPlayStoreManaged(ManagedCallback callback); On 2017/04/11 21:16:28, khmel wrote: ...
3 years, 8 months ago (2017-04-11 21:36:05 UTC) #32
khmel
https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl File chrome/common/extensions/api/autotest_private.idl (right): https://codereview.chromium.org/2801173002/diff/60001/chrome/common/extensions/api/autotest_private.idl#newcode126 chrome/common/extensions/api/autotest_private.idl:126: static void isPlayStoreManaged(ManagedCallback callback); On 2017/04/11 21:36:05, stevenjb wrote: ...
3 years, 8 months ago (2017-04-13 00:15:30 UTC) #33
stevenjb
lgtm w/ optional suggestions https://codereview.chromium.org/2801173002/diff/100001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/100001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode392 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:392: play_store_state_value->SetBoolean("allowed", false); nit: Maybe just ...
3 years, 8 months ago (2017-04-13 00:23:48 UTC) #34
khmel
Thank you Steven for review! https://codereview.chromium.org/2801173002/diff/100001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/100001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode392 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:392: play_store_state_value->SetBoolean("allowed", false); On 2017/04/13 ...
3 years, 8 months ago (2017-04-13 01:14:21 UTC) #35
Luis Héctor Chávez
lgtm with a nit https://codereview.chromium.org/2801173002/diff/120001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/120001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode389 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:389: new base::DictionaryValue); nit: play_store_state_value = ...
3 years, 8 months ago (2017-04-13 14:18:26 UTC) #40
khmel
Thank you Luis for review, Presubmit is still unhappy. Adding jochen@ for approval. PTAL https://codereview.chromium.org/2801173002/diff/120001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc ...
3 years, 8 months ago (2017-04-13 16:54:27 UTC) #42
Devlin
https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode387 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:387: DVLOG(1) << "AutotestPrivateGetPlayStoreStateFunction"; Do you need to keep these ...
3 years, 8 months ago (2017-04-13 21:49:52 UTC) #43
khmel
Thanks Devlin for comments. Please find updated version. https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode387 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:387: DVLOG(1) ...
3 years, 8 months ago (2017-04-13 23:02:51 UTC) #44
Devlin
https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode415 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:415: if (params->enabled != arc::IsArcPlayStoreEnabledForProfile(profile)) { On 2017/04/13 23:02:51, khmel ...
3 years, 8 months ago (2017-04-13 23:06:00 UTC) #45
khmel
https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/140001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode415 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:415: if (params->enabled != arc::IsArcPlayStoreEnabledForProfile(profile)) { On 2017/04/13 23:06:00, Devlin ...
3 years, 8 months ago (2017-04-13 23:16:01 UTC) #46
Devlin
lgtm % nits https://codereview.chromium.org/2801173002/diff/180001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc File chrome/browser/extensions/api/autotest_private/autotest_private_api.cc (right): https://codereview.chromium.org/2801173002/diff/180001/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc#newcode408 chrome/browser/extensions/api/autotest_private/autotest_private_api.cc:408: EXTENSION_FUNCTION_VALIDATE(params.get()); nit: this can just be ...
3 years, 8 months ago (2017-04-14 14:34:25 UTC) #47
khmel
Thank you Devlin for review! As PS: We probably need to refactor autotest API because ...
3 years, 8 months ago (2017-04-14 15:39:19 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2801173002/200001
3 years, 8 months ago (2017-04-14 15:39:50 UTC) #51
commit-bot: I haz the power
3 years, 8 months ago (2017-04-14 16:56:26 UTC) #54
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/d127ade1e89dd1b221e85170e0db...

Powered by Google App Engine
This is Rietveld 408576698