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

Issue 2611883002: Prepare to call GMS APIs from WebView (Closed)

Created:
3 years, 11 months ago by paulmiller
Modified:
3 years, 11 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prepare to call GMS APIs from WebView - Switch setMetricsSettingListener from a listener to a 1-time query. - Replace tryEnableGms with canUseGms. (tryEnableGms will actually be removed in a follow-up, since overloading implementations elsewhere must be removed first.) - Fix the race condition between native AwMetricsServiceClient initialization and Java metrics setting query. The Java side will wait for native initialization before switching on metrics. - Move the native AwMetricsServiceClient implementation to native/, replacing AwMetricsServiceSwitch, so it can signal the Java AwMetricsServiceClient when it's ready. - Fix AwTestBase, which was incorrectly creating AwBrowserContext on the test thread. That was preventing us from using assertOnUiThread. - ...which requires fixing AwStrictModeTest, which was going out of its way to create AwBrowserContext on the UI thread, as runOnMainSync doesn't allow redundant invocations. - Some miscellaneous comment & whitespace cleanup. BUG=676523 Review-Url: https://codereview.chromium.org/2611883002 Cr-Commit-Position: refs/heads/master@{#443776} Committed: https://chromium.googlesource.com/chromium/src/+/85990128f90e66efb2d1a83caeca578ab93c275e

Patch Set 1 #

Total comments: 12

Patch Set 2 : fix ALL the things #

Patch Set 3 : wait no can't remove tryEnableGms yet #

Patch Set 4 : fix description #

Patch Set 5 : fix trybot failures by refactoring ALL the things #

Patch Set 6 : rebase #

Patch Set 7 : fix AwStrictModeTest #

Total comments: 4

Patch Set 8 : rebase #

Patch Set 9 : move platform query from AwContents to WebViewChromiumFactoryProvider #

Patch Set 10 : explicit destructor for style checker #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -425 lines) Patch
M android_webview/browser/aw_browser_context.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_metrics_service_client.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -55 lines 0 comments Download
M android_webview/browser/aw_metrics_service_client.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -210 lines 0 comments Download
M android_webview/glue/glue.gni View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java View 1 2 3 4 2 chunks +0 lines, -6 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwMetricsServiceClient.java View 1 2 3 4 5 6 7 8 3 chunks +38 lines, -16 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java View 1 2 4 chunks +18 lines, -7 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwStrictModeTest.java View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java View 1 2 3 4 5 6 1 chunk +9 lines, -3 lines 0 comments Download
M android_webview/native/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M android_webview/native/android_webview_jni_registrar.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + android_webview/native/aw_metrics_service_client_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +28 lines, -39 lines 0 comments Download
A + android_webview/native/aw_metrics_service_client_impl.cc View 1 2 3 4 5 6 7 8 9 8 chunks +55 lines, -42 lines 0 comments Download
D android_webview/native/aw_metrics_switch.h View 1 2 3 4 1 chunk +0 lines, -16 lines 0 comments Download
M android_webview/native/aw_metrics_switch.cc View 1 2 3 4 1 chunk +0 lines, -23 lines 0 comments Download

Messages

Total messages: 38 (13 generated)
paulmiller
On 2017/01/03 23:26:19, paulmiller wrote: > mailto:paulmiller@chromium.org changed reviewers: > + mailto:sgurun@chromium.org PTAL
3 years, 11 months ago (2017-01-03 23:26:31 UTC) #3
sgurun-gerrit only
On 2017/01/03 23:26:31, paulmiller wrote: > On 2017/01/03 23:26:19, paulmiller wrote: > > mailto:paulmiller@chromium.org changed ...
3 years, 11 months ago (2017-01-04 00:05:16 UTC) #4
sgurun-gerrit only
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode62 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:62: public void queryMetricsEnabled(ValueCallback<Boolean> callback) { I prefer allowMetricsService() as ...
3 years, 11 months ago (2017-01-04 00:05:24 UTC) #5
paulmiller
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode62 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:62: public void queryMetricsEnabled(ValueCallback<Boolean> callback) { On 2017/01/04 00:05:24, sgurun ...
3 years, 11 months ago (2017-01-04 00:10:15 UTC) #6
sgurun-gerrit only
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode56 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:56: public boolean tryEnableGms() { remove this method. https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode62 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:62: ...
3 years, 11 months ago (2017-01-04 00:31:53 UTC) #7
paulmiller
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode62 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:62: public void queryMetricsEnabled(ValueCallback<Boolean> callback) { On 2017/01/04 00:31:53, sgurun ...
3 years, 11 months ago (2017-01-04 00:54:41 UTC) #8
sgurun-gerrit only
On 2017/01/04 00:54:41, paulmiller wrote: > https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java > File > android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java > (right): > > ...
3 years, 11 months ago (2017-01-04 01:09:08 UTC) #9
gsennton
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode60 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:60: // Overriding implementations may call "callback" asynchronously, but they ...
3 years, 11 months ago (2017-01-04 10:09:55 UTC) #11
paulmiller
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode60 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:60: // Overriding implementations may call "callback" asynchronously, but they ...
3 years, 11 months ago (2017-01-04 18:12:41 UTC) #12
gsennton
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode60 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:60: // Overriding implementations may call "callback" asynchronously, but they ...
3 years, 11 months ago (2017-01-04 18:35:04 UTC) #13
paulmiller
Hmmm, trybots failing with nativeSetMetricsEnabled "Native method not found". It works for me locally, though. ...
3 years, 11 months ago (2017-01-04 18:45:00 UTC) #14
gsennton
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode60 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:60: // Overriding implementations may call "callback" asynchronously, but they ...
3 years, 11 months ago (2017-01-04 20:31:01 UTC) #15
sgurun-gerrit only
I don't know why the bots fail, skimmed through but nothing popped up. let me ...
3 years, 11 months ago (2017-01-04 20:33:05 UTC) #16
paulmiller
https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java File android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java (right): https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java#newcode60 android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java:60: // Overriding implementations may call "callback" asynchronously, but they ...
3 years, 11 months ago (2017-01-04 22:26:12 UTC) #17
gsennton
On 2017/01/04 22:26:12, paulmiller wrote: > https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java > File > android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java > (right): > > ...
3 years, 11 months ago (2017-01-10 12:47:54 UTC) #20
gsennton
also cc'ing Toby as an FYI
3 years, 11 months ago (2017-01-10 12:48:26 UTC) #22
paulmiller
On 2017/01/10 12:47:54, gsennton wrote: > On 2017/01/04 22:26:12, paulmiller wrote: > > > https://codereview.chromium.org/2611883002/diff/1/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java ...
3 years, 11 months ago (2017-01-10 18:04:38 UTC) #23
gsennton
On 2017/01/10 18:04:38, paulmiller wrote: > On 2017/01/10 12:47:54, gsennton wrote: > > On 2017/01/04 ...
3 years, 11 months ago (2017-01-10 18:30:28 UTC) #24
sgurun-gerrit only
On 2017/01/10 18:30:28, gsennton wrote: > On 2017/01/10 18:04:38, paulmiller wrote: > > On 2017/01/10 ...
3 years, 11 months ago (2017-01-10 20:07:29 UTC) #25
sgurun-gerrit only
a few comments for now. I will look throughly once you answer them. https://codereview.chromium.org/2611883002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java File ...
3 years, 11 months ago (2017-01-13 07:12:16 UTC) #28
paulmiller
PTAL at patch set 8. linux_android_rel_ng passed; linux_android_dbg_ng, failed, but I ran that test locally, ...
3 years, 11 months ago (2017-01-13 20:43:59 UTC) #29
sgurun-gerrit only
On 2017/01/13 20:43:59, paulmiller wrote: > PTAL at patch set 8. linux_android_rel_ng passed; linux_android_dbg_ng, failed, ...
3 years, 11 months ago (2017-01-14 00:24:35 UTC) #30
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/2611883002/150001
3 years, 11 months ago (2017-01-14 00:49:12 UTC) #32
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/2611883002/170001
3 years, 11 months ago (2017-01-14 02:06:16 UTC) #35
commit-bot: I haz the power
3 years, 11 months ago (2017-01-14 03:03:51 UTC) #38
Message was sent while issue was closed.
Committed patchset #10 (id:170001) as
https://chromium.googlesource.com/chromium/src/+/85990128f90e66efb2d1a83caeca...

Powered by Google App Engine
This is Rietveld 408576698