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

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

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