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

Issue 10344004: Add content API for requesting the current geolocation (Closed)

Created:
8 years, 7 months ago by bartfab (slow)
Modified:
8 years, 7 months ago
Reviewers:
jam, John Knottenbelt
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, joth
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add content API for requesting the current geolocation This CL adds a RequestLocationUpdate() function through which the embedder can request a one-time callback when the next location update becomes available. Unit tests and a method for easy location mocking are provided. This CL depends on https://chromiumcodereview.appspot.com/10316007/ BUG=chromium-os:18710 TEST=unit_tests, content_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135322

Patch Set 1 #

Patch Set 2 : Rebased. #

Total comments: 2

Patch Set 3 : Removed method for mocking geolocation in unit tests for now, as requested by jam@. #

Total comments: 2

Patch Set 4 : Put functions back into random order for easier reviewing. #

Total comments: 4

Patch Set 5 : Nits addressed. #

Patch Set 6 : Undid another style fix to reduce the number of lines changed. #

Total comments: 4

Patch Set 7 : Comments addressed. #

Patch Set 8 : Fix forward-declaration of struct as class. #

Patch Set 9 : *Argh*, missed another forward declaration of a struct as a class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -211 lines) Patch
M content/browser/geolocation/geolocation.cc View 1 2 3 4 5 6 3 chunks +36 lines, -3 lines 0 comments Download
M content/browser/geolocation/geolocation_observer.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/geolocation/geolocation_provider.h View 1 2 3 4 5 6 7 8 2 chunks +56 lines, -40 lines 0 comments Download
M content/browser/geolocation/geolocation_provider.cc View 1 2 3 4 5 6 4 chunks +63 lines, -32 lines 0 comments Download
M content/browser/geolocation/geolocation_provider_unittest.cc View 1 2 1 chunk +144 lines, -133 lines 0 comments Download
M content/public/browser/geolocation.h View 1 2 1 chunk +17 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
bartfab (slow)
Hi John, Marcus, Could you please review this CL? @Marcus: I am looping in as ...
8 years, 7 months ago (2012-05-02 19:10:21 UTC) #1
jam
http://codereview.chromium.org/10344004/diff/3001/content/public/browser/geolocation.h File content/public/browser/geolocation.h (right): http://codereview.chromium.org/10344004/diff/3001/content/public/browser/geolocation.h#newcode29 content/public/browser/geolocation.h:29: // (crbug.com/125931). it's a bit odd adding this warning ...
8 years, 7 months ago (2012-05-02 20:59:04 UTC) #2
bartfab (slow)
The issue is that OverrideLocationForTesting() is meant to be used far beyond the scope of ...
8 years, 7 months ago (2012-05-02 21:06:28 UTC) #3
jam
it's hard to review this change with all the function moves. these should be done ...
8 years, 7 months ago (2012-05-03 06:17:49 UTC) #4
bartfab (slow)
As requested, I put the functions in geolocation_provider.cc back into their random order for easier ...
8 years, 7 months ago (2012-05-03 08:41:15 UTC) #5
bartfab (slow)
Replacing reviewer bulach@ with jknotten@ as I believe he will be back in the office ...
8 years, 7 months ago (2012-05-03 14:25:07 UTC) #6
jam
lgtm http://codereview.chromium.org/10344004/diff/3005/content/browser/geolocation/geolocation.cc File content/browser/geolocation/geolocation.cc (left): http://codereview.chromium.org/10344004/diff/3005/content/browser/geolocation/geolocation.cc#oldcode30 content/browser/geolocation/geolocation.cc:30: void OverrideLocationForTesting( nit: no need to change the ...
8 years, 7 months ago (2012-05-03 18:22:19 UTC) #7
bartfab (slow)
http://codereview.chromium.org/10344004/diff/3005/content/browser/geolocation/geolocation.cc File content/browser/geolocation/geolocation.cc (left): http://codereview.chromium.org/10344004/diff/3005/content/browser/geolocation/geolocation.cc#oldcode30 content/browser/geolocation/geolocation.cc:30: void OverrideLocationForTesting( The intention was not to enforce one ...
8 years, 7 months ago (2012-05-04 08:30:21 UTC) #8
John Knottenbelt
Thanks for doing this, Bart! http://codereview.chromium.org/10344004/diff/22001/content/browser/geolocation/geolocation.cc File content/browser/geolocation/geolocation.cc (right): http://codereview.chromium.org/10344004/diff/22001/content/browser/geolocation/geolocation.cc#newcode61 content/browser/geolocation/geolocation.cc:61: if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { Please ...
8 years, 7 months ago (2012-05-04 10:16:58 UTC) #9
bartfab (slow)
John Knottenbelt, could you have another look and approve the CL if you see no ...
8 years, 7 months ago (2012-05-04 10:35:58 UTC) #10
John Knottenbelt
lgtm
8 years, 7 months ago (2012-05-04 10:54:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/10344004/25002
8 years, 7 months ago (2012-05-04 10:55:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/10344004/18010
8 years, 7 months ago (2012-05-04 11:10:21 UTC) #13
commit-bot: I haz the power
Try job failure for 10344004-18010 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 7 months ago (2012-05-04 11:32:54 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/10344004/21005
8 years, 7 months ago (2012-05-04 11:44:58 UTC) #15
commit-bot: I haz the power
8 years, 7 months ago (2012-05-04 13:04:49 UTC) #16
Change committed as 135322

Powered by Google App Engine
This is Rietveld 408576698