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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
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/geolocation_provider_impl.h" 5 #include "content/browser/geolocation/geolocation_provider_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (ignore_location_updates_) 61 if (ignore_location_updates_)
62 return; 62 return;
63 BrowserThread::PostTask(BrowserThread::UI, 63 BrowserThread::PostTask(BrowserThread::UI,
64 FROM_HERE, 64 FROM_HERE,
65 base::Bind(&GeolocationProviderImpl::NotifyClients, 65 base::Bind(&GeolocationProviderImpl::NotifyClients,
66 base::Unretained(this), position)); 66 base::Unretained(this), position));
67 } 67 }
68 68
69 GeolocationProviderImpl* GeolocationProviderImpl::GetInstance() { 69 GeolocationProviderImpl* GeolocationProviderImpl::GetInstance() {
70 DCHECK_CURRENTLY_ON(BrowserThread::UI); 70 DCHECK_CURRENTLY_ON(BrowserThread::UI);
71 return Singleton<GeolocationProviderImpl>::get(); 71 return base::Singleton<GeolocationProviderImpl>::get();
72 } 72 }
73 73
74 GeolocationProviderImpl::GeolocationProviderImpl() 74 GeolocationProviderImpl::GeolocationProviderImpl()
75 : base::Thread("Geolocation"), 75 : base::Thread("Geolocation"),
76 user_did_opt_into_location_services_(false), 76 user_did_opt_into_location_services_(false),
77 ignore_location_updates_(false), 77 ignore_location_updates_(false),
78 arbitrator_(NULL) { 78 arbitrator_(NULL) {
79 DCHECK_CURRENTLY_ON(BrowserThread::UI); 79 DCHECK_CURRENTLY_ON(BrowserThread::UI);
80 high_accuracy_callbacks_.set_removal_callback( 80 high_accuracy_callbacks_.set_removal_callback(
81 base::Bind(&GeolocationProviderImpl::OnClientsChanged, 81 base::Bind(&GeolocationProviderImpl::OnClientsChanged,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 arbitrator_ = NULL; 171 arbitrator_ = NULL;
172 } 172 }
173 173
174 LocationArbitrator* GeolocationProviderImpl::CreateArbitrator() { 174 LocationArbitrator* GeolocationProviderImpl::CreateArbitrator() {
175 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( 175 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind(
176 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); 176 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this));
177 return new LocationArbitratorImpl(callback); 177 return new LocationArbitratorImpl(callback);
178 } 178 }
179 179
180 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_provider_impl.h ('k') | content/browser/geolocation/location_api_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698