Chromium Code Reviews
DescriptionGeolocation: 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 #Messages
Total messages: 40 (22 generated)
|