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

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

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm 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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 void GeolocationArbitrator::DoStartProviders() { 79 void GeolocationArbitrator::DoStartProviders() {
80 for (ScopedVector<LocationProviderBase>::iterator i = providers_.begin(); 80 for (ScopedVector<LocationProviderBase>::iterator i = providers_.begin();
81 i != providers_.end(); ++i) { 81 i != providers_.end(); ++i) {
82 (*i)->StartProvider(current_provider_options_.use_high_accuracy); 82 (*i)->StartProvider(current_provider_options_.use_high_accuracy);
83 } 83 }
84 } 84 }
85 85
86 void GeolocationArbitrator::StopProviders() { 86 void GeolocationArbitrator::StopProviders() {
87 providers_.reset(); 87 providers_.clear();
88 } 88 }
89 89
90 void GeolocationArbitrator::OnAccessTokenStoresLoaded( 90 void GeolocationArbitrator::OnAccessTokenStoresLoaded(
91 AccessTokenStore::AccessTokenSet access_token_set, 91 AccessTokenStore::AccessTokenSet access_token_set,
92 net::URLRequestContextGetter* context_getter) { 92 net::URLRequestContextGetter* context_getter) {
93 if (!providers_.empty()) { 93 if (!providers_.empty()) {
94 // A second StartProviders() call may have arrived before the first 94 // A second StartProviders() call may have arrived before the first
95 // completed. 95 // completed.
96 return; 96 return;
97 } 97 }
(...skipping 64 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 | « chromeos/dbus/ibus/ibus_property_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698