| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/browser/geolocation/arbitrator_dependency_factory.h" | |
| 6 | |
| 7 #include "chrome/browser/profiles/profile.h" | |
| 8 #include "content/browser/geolocation/access_token_store.h" | |
| 9 #include "content/browser/geolocation/location_provider.h" | |
| 10 | |
| 11 // GeolocationArbitratorDependencyFactory | |
| 12 GeolocationArbitratorDependencyFactory:: | |
| 13 ~GeolocationArbitratorDependencyFactory() { | |
| 14 } | |
| 15 | |
| 16 // DefaultGeolocationArbitratorDependencyFactory | |
| 17 URLRequestContextGetter* | |
| 18 DefaultGeolocationArbitratorDependencyFactory::GetContextGetter() { | |
| 19 return Profile::GetDefaultRequestContext(); | |
| 20 } | |
| 21 | |
| 22 DefaultGeolocationArbitratorDependencyFactory::GetTimeNow | |
| 23 DefaultGeolocationArbitratorDependencyFactory::GetTimeFunction() { | |
| 24 return base::Time::Now; | |
| 25 } | |
| 26 | |
| 27 AccessTokenStore* | |
| 28 DefaultGeolocationArbitratorDependencyFactory::NewAccessTokenStore() { | |
| 29 return NewChromePrefsAccessTokenStore(); | |
| 30 } | |
| 31 | |
| 32 LocationProviderBase* | |
| 33 DefaultGeolocationArbitratorDependencyFactory::NewNetworkLocationProvider( | |
| 34 AccessTokenStore* access_token_store, | |
| 35 URLRequestContextGetter* context, | |
| 36 const GURL& url, | |
| 37 const string16& access_token) { | |
| 38 return ::NewNetworkLocationProvider(access_token_store, context, | |
| 39 url, access_token); | |
| 40 } | |
| 41 | |
| 42 LocationProviderBase* | |
| 43 DefaultGeolocationArbitratorDependencyFactory::NewSystemLocationProvider() { | |
| 44 return ::NewSystemLocationProvider(); | |
| 45 } | |
| 46 | |
| OLD | NEW |