| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/geolocation/location_arbitrator_impl.h" | 5 #include "content/browser/geolocation/location_arbitrator_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 position_provider_ = provider; | 118 position_provider_ = provider; |
| 119 position_ = new_position; | 119 position_ = new_position; |
| 120 observer_->OnLocationUpdate(position_); | 120 observer_->OnLocationUpdate(position_); |
| 121 } | 121 } |
| 122 | 122 |
| 123 AccessTokenStore* GeolocationArbitratorImpl::NewAccessTokenStore() { | 123 AccessTokenStore* GeolocationArbitratorImpl::NewAccessTokenStore() { |
| 124 return GetContentClient()->browser()->CreateAccessTokenStore(); | 124 return GetContentClient()->browser()->CreateAccessTokenStore(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 AccessTokenStore* GeolocationArbitratorImpl::GetAccessTokenStore() { | 127 AccessTokenStore* GeolocationArbitratorImpl::GetAccessTokenStore() { |
| 128 if (!access_token_store_.get()) | 128 if (!access_token_store_) |
| 129 access_token_store_ = NewAccessTokenStore(); | 129 access_token_store_ = NewAccessTokenStore(); |
| 130 return access_token_store_.get(); | 130 return access_token_store_.get(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 LocationProviderBase* GeolocationArbitratorImpl::NewNetworkLocationProvider( | 133 LocationProviderBase* GeolocationArbitratorImpl::NewNetworkLocationProvider( |
| 134 AccessTokenStore* access_token_store, | 134 AccessTokenStore* access_token_store, |
| 135 net::URLRequestContextGetter* context, | 135 net::URLRequestContextGetter* context, |
| 136 const GURL& url, | 136 const GURL& url, |
| 137 const string16& access_token) { | 137 const string16& access_token) { |
| 138 #if defined(OS_ANDROID) | 138 #if defined(OS_ANDROID) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 return false; | 178 return false; |
| 179 } | 179 } |
| 180 | 180 |
| 181 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { | 181 bool GeolocationArbitratorImpl::HasPermissionBeenGranted() const { |
| 182 return is_permission_granted_; | 182 return is_permission_granted_; |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace content | 185 } // namespace content |
| OLD | NEW |