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

Issue 11416347: Adding java implementation for Geolocation (Closed)

Created:
8 years ago by Kristian Monsen
Modified:
8 years ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Visibility:
Public.

Description

Adding java implementation for Geolocation Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173328

Patch Set 1 #

Total comments: 36

Patch Set 2 : Updated to use apply and shared prefs #

Total comments: 13

Patch Set 3 : Updated ThreadUtils and got results before moving to UI thread #

Total comments: 9

Patch Set 4 : Code dereplication #

Patch Set 5 : Boolean pref edition, I think I like it better. I think the lock can be removed as well? #

Patch Set 6 : Removed not needed if #

Total comments: 10

Patch Set 7 : Removed the lock #

Total comments: 4

Patch Set 8 : Add prefix in origin conversion, changed class name to have an Aw prefix to avoid name collision #

Patch Set 9 : Removed not needed imports #

Patch Set 10 : Finding origin with native code and Gurl #

Patch Set 11 : Removed non existent imports #

Patch Set 12 : Moved the JNI to net/ and renamed to GurlUtils #

Total comments: 12

Patch Set 13 : Renamed GurlUtils -> GURLUtils, other minor edits #

Patch Set 14 : Updated comment and copyright date #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -4 lines) Patch
A android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +101 lines, -0 lines 0 comments Download
M base/android/java/src/org/chromium/base/ThreadUtils.java View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
A + net/android/gurl_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -4 lines 5 comments Download
A net/android/gurl_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -0 lines 1 comment Download
A net/android/java/src/org/chromium/net/GURLUtils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +27 lines, -0 lines 0 comments Download
M net/android/net_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
benm (inactive)
https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode23 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:23: * All methods in this class are async. What ...
8 years ago (2012-12-05 11:35:05 UTC) #1
joth
https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode25 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:25: @JNINamespace("android_webview") not needed as there's no JNI here... except, ...
8 years ago (2012-12-06 01:52:33 UTC) #2
joth
https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode40 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:40: Thread t = new Thread() { On 2012/12/06 01:52:33, ...
8 years ago (2012-12-06 02:08:10 UTC) #3
Kristian Monsen
Thank you for the reviews, I think I have addressed all comments. There code has ...
8 years ago (2012-12-06 23:07:35 UTC) #4
joth
https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/1/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode33 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:33: private static final Object lock = new Object(); On ...
8 years ago (2012-12-06 23:37:04 UTC) #5
benm (inactive)
https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode26 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:26: private static final String PREF_ALLOWED_ORIGINS = "geolocation.AllowedOrgins"; nit: Might ...
8 years ago (2012-12-07 14:07:56 UTC) #6
Kristian Monsen
https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode26 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:26: private static final String PREF_ALLOWED_ORIGINS = "geolocation.AllowedOrgins"; On 2012/12/07 ...
8 years ago (2012-12-07 21:25:28 UTC) #7
joth
https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/5001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode49 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:49: On 2012/12/07 21:25:29, kristianm1 wrote: > On 2012/12/06 23:37:05, ...
8 years ago (2012-12-07 23:47:33 UTC) #8
Kristian Monsen
Fixed these, will look into using boolean prefs. https://codereview.chromium.org/11416347/diff/11001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/11001/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode27 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:27: "org.chromium.android_webview.GeolocationPermissions.AllowedOrgins"; ...
8 years ago (2012-12-08 00:38:18 UTC) #9
Kristian Monsen
New version with boolean prefs, I think it is simpler. I think the lock can ...
8 years ago (2012-12-08 01:24:37 UTC) #10
joth
Ace! Only nits https://codereview.chromium.org/11416347/diff/15002/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/15002/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode15 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:15: import java.util.concurrent.FutureTask; don't think these are ...
8 years ago (2012-12-08 01:39:24 UTC) #11
joth
2 more minor comments. https://codereview.chromium.org/11416347/diff/10003/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/10003/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode26 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:26: private static final String PREF_PREFIX ...
8 years ago (2012-12-08 01:51:33 UTC) #12
Kristian Monsen
Addressed all comments, PTAL. https://codereview.chromium.org/11416347/diff/15002/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/15002/android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java#newcode15 android_webview/java/src/org/chromium/android_webview/GeolocationPermissions.java:15: import java.util.concurrent.FutureTask; On 2012/12/08 01:39:24, ...
8 years ago (2012-12-10 22:58:16 UTC) #13
joth
lgtm
8 years ago (2012-12-10 23:38:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kristianm@chromium.org/11416347/22001
8 years ago (2012-12-11 18:35:15 UTC) #15
Kristian Monsen
On 2012/12/11 18:35:15, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
8 years ago (2012-12-11 18:54:36 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-12-11 18:55:53 UTC) #17
Kristian Monsen
Getting the origin from GURL, make a new general java class in net. Please take ...
8 years ago (2012-12-13 03:24:26 UTC) #18
joth
https://codereview.chromium.org/11416347/diff/34005/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/34005/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java#newcode95 android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java:95: if (origin.isEmpty()) { origin will be null for invalid ...
8 years ago (2012-12-13 04:59:54 UTC) #19
joth
https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java File net/android/java/src/org/chromium/net/GurlUtils.java (right): https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java#newcode26 net/android/java/src/org/chromium/net/GurlUtils.java:26: if (origin.isEmpty()) { use this for concise NPE safe ...
8 years ago (2012-12-13 18:30:54 UTC) #20
joth
https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java File net/android/java/src/org/chromium/net/GurlUtils.java (right): https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java#newcode26 net/android/java/src/org/chromium/net/GurlUtils.java:26: if (origin.isEmpty()) { On 2012/12/13 18:30:54, joth wrote: > ...
8 years ago (2012-12-13 18:33:37 UTC) #21
Kristian Monsen
https://codereview.chromium.org/11416347/diff/34005/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java File android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java (right): https://codereview.chromium.org/11416347/diff/34005/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java#newcode95 android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java:95: if (origin.isEmpty()) { On 2012/12/13 04:59:54, joth wrote: > ...
8 years ago (2012-12-13 20:41:27 UTC) #22
joth
lgtm modulo this function comment. https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java File net/android/java/src/org/chromium/net/GurlUtils.java (right): https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java#newcode19 net/android/java/src/org/chromium/net/GurlUtils.java:19: * would return "http://www.example.com:8080". ...
8 years ago (2012-12-13 21:50:19 UTC) #23
Kristian Monsen
On 2012/12/13 21:50:19, joth wrote: > lgtm modulo this function comment. > > https://codereview.chromium.org/11416347/diff/34005/net/android/java/src/org/chromium/net/GurlUtils.java > ...
8 years ago (2012-12-13 22:07:54 UTC) #24
joth
lgtm. looks like yfriedman is the only west-coast net/android reviewer.
8 years ago (2012-12-13 22:29:58 UTC) #25
Kristian Monsen
Added Yaron and Will from the owners files since they are west coast based.
8 years ago (2012-12-13 22:36:41 UTC) #26
willchan no longer on Chromium
Sorry, I'm going to defer to Yaron. I don't know this well enough :) https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h ...
8 years ago (2012-12-13 22:44:28 UTC) #27
joth
On 13 December 2012 14:44, <willchan@chromium.org> wrote: > Sorry, I'm going to defer to Yaron. ...
8 years ago (2012-12-13 22:59:32 UTC) #28
willchan no longer on Chromium
Thanks for clarifying. net/net.gyp lgtm.
8 years ago (2012-12-13 23:02:00 UTC) #29
Kristian Monsen
https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h File net/android/gurl_utils.h (left): https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h#oldcode5 net/android/gurl_utils.h:5: #include "net/quic/crypto/crypto_protocol.h" On 2012/12/13 22:44:29, willchan wrote: > Hehe, ...
8 years ago (2012-12-13 23:32:32 UTC) #30
willchan no longer on Chromium
https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h File net/android/gurl_utils.h (right): https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h#newcode8 net/android/gurl_utils.h:8: #include <jni.h> On 2012/12/13 23:32:32, kristianm1 wrote: > On ...
8 years ago (2012-12-13 23:41:09 UTC) #31
Kristian Monsen
On 2012/12/13 23:41:09, willchan wrote: > https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h > File net/android/gurl_utils.h (right): > > https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.h#newcode8 > ...
8 years ago (2012-12-13 23:43:25 UTC) #32
joth
On 13 December 2012 15:43, <kristianm@chromium.org> wrote: > On 2012/12/13 23:41:09, willchan wrote: > >> ...
8 years ago (2012-12-14 00:32:36 UTC) #33
Yaron
https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.cc File net/android/gurl_utils.cc (right): https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.cc#newcode17 net/android/gurl_utils.cc:17: host.GetOrigin().spec()).Release(); Hmm. You shouldn't need to manager this yourself. ...
8 years ago (2012-12-14 02:09:07 UTC) #34
Yaron
On 2012/12/14 02:09:07, Yaron wrote: > https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.cc > File net/android/gurl_utils.cc (right): > > https://codereview.chromium.org/11416347/diff/44009/net/android/gurl_utils.cc#newcode17 > ...
8 years ago (2012-12-14 18:50:03 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kristianm@chromium.org/11416347/44009
8 years ago (2012-12-14 23:09:24 UTC) #36
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-15 04:36:42 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kristianm@chromium.org/11416347/44009
8 years ago (2012-12-15 04:47:58 UTC) #38
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-15 07:55:45 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kristianm@chromium.org/11416347/44009
8 years ago (2012-12-15 18:49:50 UTC) #40
commit-bot: I haz the power
8 years ago (2012-12-15 22:19:49 UTC) #41
Message was sent while issue was closed.
Change committed as 173328

Powered by Google App Engine
This is Rietveld 408576698