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

Issue 2098553002: Geolocation: extract ContentBrowserClient methods specific to Geolocation into a class (Closed)

Created:
4 years, 6 months ago by mcasas
Modified:
4 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-geolocation_chromium.org, Michael van Ouwerkerk, CJ, ostap
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Geolocation: extract ContentBrowserClient methods specific to Geolocation into a class ToT ContentBrowserClient defines three methods: + bool UseNetworkLocationProvider() (overriden in {blimp,content}_browser_client) + LocationProvider* OverrideSystemLocationProvider() (overriden in (a) downstream project(s) and blimp_content_browser_client.) + AccessTokenStore* CreateAccessTokenStore() (overriden in {aw,cast,chrome,content,shell}_browser_client.) which are used from LocationArbitratorImpl, after accessing the embedder via GetContentClient()->browser(). This CL changes LocationArbitratorImpl to get a (weak) GeolocationProvider::Delegate* on ctor; this object encapsulates the 3 previously mentioned methods, that are (partially) overriden in each Client. This CL also changes all those implementations and the unittests (which is quite simplified) to follow the object-getter pattern. This CL is a preliminary step to move Geolocation to //device/ and is a refactoring. BUG=612334 TEST=all relevant unittests and browser_tests working, in particular ./out/gn/browser_tests --gtest_filter="GeolocationBrowserTest.*" ./out/gn/content_unittests --gtest_filter="GeolocationLocationArbitratorTest.*" Committed: https://crrev.com/fb78b8ad1bc06869f1d0c3b533dc3f0a81f75811 Cr-Commit-Position: refs/heads/master@{#402526}

Patch Set 1 #

Patch Set 2 : Changing to ContentBrowserClient::GetGeolocationServiceOverrides and impl'd in the 6 impl's. Unitte… #

Total comments: 20

Patch Set 3 : Michael's comments (plenty of renames) #

Total comments: 4

Patch Set 4 : Rebase. Minor touch in LocationArbitratorImplTest to restate previous behaviour. #

Total comments: 18

Patch Set 5 : mvanouwerkerk@s nits #

Total comments: 1

Patch Set 6 : Added a TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -91 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 2 chunks +16 lines, -2 lines 0 comments Download
M blimp/engine/app/blimp_content_browser_client.h View 1 2 3 3 chunks +1 line, -5 lines 0 comments Download
M blimp/engine/app/blimp_content_browser_client.cc View 1 2 3 4 2 chunks +26 lines, -10 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 2 chunks +17 lines, -2 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 2 3 4 2 chunks +19 lines, -2 lines 0 comments Download
M content/browser/geolocation/geolocation_provider_impl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/geolocation/geolocation_provider_impl.cc View 1 2 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/geolocation/location_arbitrator_impl.h View 1 2 4 chunks +7 lines, -1 line 0 comments Download
M content/browser/geolocation/location_arbitrator_impl.cc View 1 2 5 chunks +9 lines, -10 lines 0 comments Download
M content/browser/geolocation/location_arbitrator_impl_unittest.cc View 1 2 3 4 11 chunks +56 lines, -29 lines 0 comments Download
M content/content_browser.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 3 chunks +4 lines, -14 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 2 chunks +3 lines, -9 lines 0 comments Download
M content/public/browser/geolocation_provider.h View 1 2 3 4 5 2 chunks +25 lines, -0 lines 0 comments Download
A content/public/browser/geolocation_provider.cc View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 4 2 chunks +19 lines, -2 lines 0 comments Download

Messages

Total messages: 40 (22 generated)
mcasas
mvanouwerkerk@ can you plz take a first -rough- look? Caveats: - name of class GeolocationProvider::ProviderOfStuff ...
4 years, 6 months ago (2016-06-23 17:39:38 UTC) #4
mcasas
On 2016/06/23 17:39:38, mcasas wrote: > mvanouwerkerk@ can you plz take a first -rough- look? ...
4 years, 6 months ago (2016-06-23 23:44:28 UTC) #7
Michael van Ouwerkerk
https://codereview.chromium.org/2098553002/diff/20001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/2098553002/diff/20001/android_webview/browser/aw_content_browser_client.cc#newcode442 android_webview/browser/aw_content_browser_client.cc:442: return new AwGeolocationServiceOverrides(); For a getter, I would expect ...
4 years, 6 months ago (2016-06-24 13:57:19 UTC) #9
Michael van Ouwerkerk
Adding CJ and Wez to CC.
4 years, 6 months ago (2016-06-24 16:11:36 UTC) #10
Wez
Looks like we should also CC sl.ostapenko@samsung.com since they're the one using the original override ...
4 years, 6 months ago (2016-06-24 18:40:26 UTC) #13
mcasas
PTAL https://codereview.chromium.org/2098553002/diff/20001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/2098553002/diff/20001/android_webview/browser/aw_content_browser_client.cc#newcode442 android_webview/browser/aw_content_browser_client.cc:442: return new AwGeolocationServiceOverrides(); On 2016/06/24 13:57:18, Michael van ...
4 years, 6 months ago (2016-06-24 19:25:53 UTC) #17
mcasas
ping
4 years, 5 months ago (2016-06-27 17:44:00 UTC) #20
CJ
https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h File content/public/browser/geolocation_provider.h (right): https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h#newcode33 content/public/browser/geolocation_provider.h:33: class CONTENT_EXPORT Delegate { Would it be possible to ...
4 years, 5 months ago (2016-06-27 18:42:56 UTC) #22
Michael van Ouwerkerk
lgtm with nits, thanks Miguel! https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h File content/public/browser/geolocation_provider.h (right): https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h#newcode33 content/public/browser/geolocation_provider.h:33: class CONTENT_EXPORT Delegate { ...
4 years, 5 months ago (2016-06-28 11:17:08 UTC) #25
mcasas
https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h File content/public/browser/geolocation_provider.h (right): https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h#newcode33 content/public/browser/geolocation_provider.h:33: class CONTENT_EXPORT Delegate { On 2016/06/28 11:17:07, Michael van ...
4 years, 5 months ago (2016-06-28 16:51:26 UTC) #27
CJ
lgtm https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h File content/public/browser/geolocation_provider.h (right): https://codereview.chromium.org/2098553002/diff/140001/content/public/browser/geolocation_provider.h#newcode33 content/public/browser/geolocation_provider.h:33: class CONTENT_EXPORT Delegate { On 2016/06/28 16:51:25, mcasas ...
4 years, 5 months ago (2016-06-28 17:00:35 UTC) #28
CJ
lgtm lgtm
4 years, 5 months ago (2016-06-28 17:00:40 UTC) #29
CJ
lgtm
4 years, 5 months ago (2016-06-28 17:00:44 UTC) #30
mcasas
jam@ RS LGTM please.
4 years, 5 months ago (2016-06-28 17:02:06 UTC) #32
jam
lgtm https://codereview.chromium.org/2098553002/diff/240001/content/public/browser/geolocation_provider.h File content/public/browser/geolocation_provider.h (right): https://codereview.chromium.org/2098553002/diff/240001/content/public/browser/geolocation_provider.h#newcode33 content/public/browser/geolocation_provider.h:33: class CONTENT_EXPORT Delegate { nit: I realize this ...
4 years, 5 months ago (2016-06-28 18:08:21 UTC) #33
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/2098553002/260001
4 years, 5 months ago (2016-06-28 18:26:46 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:260001)
4 years, 5 months ago (2016-06-28 20:24:57 UTC) #38
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 20:27:40 UTC) #40
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/fb78b8ad1bc06869f1d0c3b533dc3f0a81f75811
Cr-Commit-Position: refs/heads/master@{#402526}

Powered by Google App Engine
This is Rietveld 408576698