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

Side by Side Diff: content/browser/geofencing/geofencing_service.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/geofencing/geofencing_service.h" 5 #include "content/browser/geofencing/geofencing_service.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 GeofencingServiceImpl::GeofencingServiceImpl() : next_registration_id_(0) { 67 GeofencingServiceImpl::GeofencingServiceImpl() : next_registration_id_(0) {
68 } 68 }
69 69
70 GeofencingServiceImpl::~GeofencingServiceImpl() { 70 GeofencingServiceImpl::~GeofencingServiceImpl() {
71 } 71 }
72 72
73 GeofencingServiceImpl* GeofencingServiceImpl::GetInstance() { 73 GeofencingServiceImpl* GeofencingServiceImpl::GetInstance() {
74 DCHECK_CURRENTLY_ON(BrowserThread::IO); 74 DCHECK_CURRENTLY_ON(BrowserThread::IO);
75 return Singleton<GeofencingServiceImpl>::get(); 75 return base::Singleton<GeofencingServiceImpl>::get();
76 } 76 }
77 77
78 bool GeofencingServiceImpl::IsServiceAvailable() { 78 bool GeofencingServiceImpl::IsServiceAvailable() {
79 DCHECK_CURRENTLY_ON(BrowserThread::IO); 79 DCHECK_CURRENTLY_ON(BrowserThread::IO);
80 return EnsureProvider(); 80 return EnsureProvider();
81 } 81 }
82 82
83 int64 GeofencingServiceImpl::RegisterRegion( 83 int64 GeofencingServiceImpl::RegisterRegion(
84 const blink::WebCircularGeofencingRegion& region, 84 const blink::WebCircularGeofencingRegion& region,
85 GeofencingRegistrationDelegate* delegate) { 85 GeofencingRegistrationDelegate* delegate) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 registration_iterator->second.delegate->RegistrationFinished( 192 registration_iterator->second.delegate->RegistrationFinished(
193 geofencing_registration_id, status); 193 geofencing_registration_id, status);
194 194
195 if (status != GEOFENCING_STATUS_OK) { 195 if (status != GEOFENCING_STATUS_OK) {
196 // Registration failed, remove from our book-keeping. 196 // Registration failed, remove from our book-keeping.
197 registrations_.erase(registration_iterator); 197 registrations_.erase(registration_iterator);
198 } 198 }
199 } 199 }
200 200
201 } // namespace content 201 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geofencing/geofencing_service.h ('k') | content/browser/geolocation/geolocation_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698