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

Side by Side Diff: content/browser/geofencing/geofencing_service.cc

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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"
8 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
9 #include "base/single_thread_task_runner.h" 8 #include "base/message_loop/message_loop.h"
10 #include "base/thread_task_runner_handle.h"
11 #include "content/browser/geofencing/geofencing_provider.h" 9 #include "content/browser/geofencing/geofencing_provider.h"
12 #include "content/browser/geofencing/geofencing_registration_delegate.h" 10 #include "content/browser/geofencing/geofencing_registration_delegate.h"
13 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
14 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" 12 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h"
15 13
16 namespace content { 14 namespace content {
17 15
18 namespace { 16 namespace {
19 17
20 void RunSoon(const base::Closure& callback) { 18 void RunSoon(const base::Closure& callback) {
21 if (!callback.is_null()) 19 if (!callback.is_null())
22 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 20 base::MessageLoop::current()->PostTask(FROM_HERE, callback);
23 } 21 }
24 22
25 } // namespace 23 } // namespace
26 24
27 struct GeofencingServiceImpl::Registration { 25 struct GeofencingServiceImpl::Registration {
28 Registration(); 26 Registration();
29 Registration(const blink::WebCircularGeofencingRegion& region, 27 Registration(const blink::WebCircularGeofencingRegion& region,
30 int64 geofencing_registration_id, 28 int64 geofencing_registration_id,
31 GeofencingRegistrationDelegate* delegate); 29 GeofencingRegistrationDelegate* delegate);
32 30
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 registration_iterator->second.delegate->RegistrationFinished( 190 registration_iterator->second.delegate->RegistrationFinished(
193 geofencing_registration_id, status); 191 geofencing_registration_id, status);
194 192
195 if (status != GEOFENCING_STATUS_OK) { 193 if (status != GEOFENCING_STATUS_OK) {
196 // Registration failed, remove from our book-keeping. 194 // Registration failed, remove from our book-keeping.
197 registrations_.erase(registration_iterator); 195 registrations_.erase(registration_iterator);
198 } 196 }
199 } 197 }
200 198
201 } // namespace content 199 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_provider.cc ('k') | content/browser/geofencing/mock_geofencing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698