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

Side by Side Diff: content/browser/geolocation/location_arbitrator.cc

Issue 10669038: base: Remove dereference structure operator (i.e ->) from ScopedVector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/installer_state.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "content/browser/geolocation/location_arbitrator.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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 DoStartProviders(); 110 DoStartProviders();
111 } 111 }
112 112
113 void GeolocationArbitrator::RegisterProvider( 113 void GeolocationArbitrator::RegisterProvider(
114 LocationProviderBase* provider) { 114 LocationProviderBase* provider) {
115 if (!provider) 115 if (!provider)
116 return; 116 return;
117 provider->RegisterListener(this); 117 provider->RegisterListener(this);
118 if (is_permission_granted_) 118 if (is_permission_granted_)
119 provider->OnPermissionGranted(); 119 provider->OnPermissionGranted();
120 providers_->push_back(provider); 120 providers_.push_back(provider);
121 } 121 }
122 122
123 void GeolocationArbitrator::LocationUpdateAvailable( 123 void GeolocationArbitrator::LocationUpdateAvailable(
124 LocationProviderBase* provider) { 124 LocationProviderBase* provider) {
125 DCHECK(provider); 125 DCHECK(provider);
126 Geoposition new_position; 126 Geoposition new_position;
127 provider->GetPosition(&new_position); 127 provider->GetPosition(&new_position);
128 DCHECK(new_position.Validate() || 128 DCHECK(new_position.Validate() ||
129 new_position.error_code != content::Geoposition::ERROR_CODE_NONE); 129 new_position.error_code != content::Geoposition::ERROR_CODE_NONE);
130 if (!IsNewPositionBetter(position_, new_position, 130 if (!IsNewPositionBetter(position_, new_position,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 bool GeolocationArbitrator::HasPermissionBeenGranted() const { 164 bool GeolocationArbitrator::HasPermissionBeenGranted() const {
165 return is_permission_granted_; 165 return is_permission_granted_;
166 } 166 }
167 167
168 void GeolocationArbitrator::SetDependencyFactoryForTest( 168 void GeolocationArbitrator::SetDependencyFactoryForTest(
169 GeolocationArbitratorDependencyFactory* dependency_factory) { 169 GeolocationArbitratorDependencyFactory* dependency_factory) {
170 g_dependency_factory_for_test = dependency_factory; 170 g_dependency_factory_for_test = dependency_factory;
171 } 171 }
OLDNEW
« no previous file with comments | « chrome/installer/util/installer_state.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698