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

Unified Diff: content/browser/geolocation/location_arbitrator_impl.cc

Issue 2028823002: Refactor to make BlimpLocationProvider accessible to content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to mvanouwerkerk's #21-1, #26 (partial) comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/geolocation/location_arbitrator_impl.cc
diff --git a/content/browser/geolocation/location_arbitrator_impl.cc b/content/browser/geolocation/location_arbitrator_impl.cc
index d6cb78b1657aa34b3567a864563d71f8477ceffb..d46cb319c1c3bdae6a5baeff677099d4272ac724 100644
--- a/content/browser/geolocation/location_arbitrator_impl.cc
+++ b/content/browser/geolocation/location_arbitrator_impl.cc
@@ -100,19 +100,20 @@ void LocationArbitratorImpl::OnAccessTokenStoresLoaded(
// completed.
return;
}
- // If there are no access tokens, boot strap it with the default server URL.
- if (access_token_map.empty())
- access_token_map[DefaultNetworkProviderURL()];
- for (const auto& entry : access_token_map) {
- RegisterProvider(NewNetworkLocationProvider(
- GetAccessTokenStore(), context_getter, entry.first, entry.second));
+ if (GetContentClient()->browser()->UseDefaultLocationProviders()) {
Wez 2016/06/01 21:45:19 Do you need access-token-stores to have been loade
CJ 2016/06/01 22:37:10 Don't think so. Done.
+ // If there are no access tokens, boot strap it with the default server URL.
+ if (access_token_map.empty())
+ access_token_map[DefaultNetworkProviderURL()];
+ for (const auto& entry : access_token_map) {
+ RegisterProvider(NewNetworkLocationProvider(
+ GetAccessTokenStore(), context_getter, entry.first, entry.second));
+ }
}
-
- LocationProvider* provider =
+ LocationProvider* provider_override =
GetContentClient()->browser()->OverrideSystemLocationProvider();
- if (!provider)
- provider = NewSystemLocationProvider();
- RegisterProvider(provider);
+ if (!provider_override)
+ provider_override = NewSystemLocationProvider();
+ RegisterProvider(provider_override);
DoStartProviders();
}

Powered by Google App Engine
This is Rietveld 408576698