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: third_party/WebKit/Source/modules/geofencing/ServiceWorkerRegistrationGeofencing.cpp

Issue 1972733002: Delete geofencing implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark histogram suffix as obsolete Created 4 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "modules/geofencing/ServiceWorkerRegistrationGeofencing.h"
6
7 #include "modules/geofencing/Geofencing.h"
8 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
9
10 namespace blink {
11
12 ServiceWorkerRegistrationGeofencing::ServiceWorkerRegistrationGeofencing(Service WorkerRegistration* registration)
13 : m_registration(registration)
14 {
15 }
16
17 ServiceWorkerRegistrationGeofencing::~ServiceWorkerRegistrationGeofencing()
18 {
19 }
20
21 const char* ServiceWorkerRegistrationGeofencing::supplementName()
22 {
23 return "ServiceWorkerRegistrationGeofencing";
24 }
25
26 ServiceWorkerRegistrationGeofencing& ServiceWorkerRegistrationGeofencing::from(S erviceWorkerRegistration& registration)
27 {
28 ServiceWorkerRegistrationGeofencing* supplement = static_cast<ServiceWorkerR egistrationGeofencing*>(Supplement<ServiceWorkerRegistration>::from(registration , supplementName()));
29 if (!supplement) {
30 supplement = new ServiceWorkerRegistrationGeofencing(&registration);
31 provideTo(registration, supplementName(), supplement);
32 }
33 return *supplement;
34 }
35
36 Geofencing* ServiceWorkerRegistrationGeofencing::geofencing(ServiceWorkerRegistr ation& registration)
37 {
38 return ServiceWorkerRegistrationGeofencing::from(registration).geofencing();
39 }
40
41 Geofencing* ServiceWorkerRegistrationGeofencing::geofencing()
42 {
43 if (!m_geofencing)
44 m_geofencing = Geofencing::create(m_registration);
45 return m_geofencing.get();
46 }
47
48 DEFINE_TRACE(ServiceWorkerRegistrationGeofencing)
49 {
50 visitor->trace(m_registration);
51 visitor->trace(m_geofencing);
52 Supplement<ServiceWorkerRegistration>::trace(visitor);
53 }
54
55 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698