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

Unified Diff: content/browser/geofencing/mock_geofencing_service.h

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 side-by-side diff with in-line comments
Download patch
Index: content/browser/geofencing/mock_geofencing_service.h
diff --git a/content/browser/geofencing/mock_geofencing_service.h b/content/browser/geofencing/mock_geofencing_service.h
deleted file mode 100644
index e69b07bebdbbd364b702931b50336bf23ec508c9..0000000000000000000000000000000000000000
--- a/content/browser/geofencing/mock_geofencing_service.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
-#define CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
-
-#include <stdint.h>
-
-#include <map>
-
-#include "content/browser/geofencing/geofencing_service.h"
-
-namespace content {
-
-// This class implements a geofencing service that doesn't rely on any
-// underlying platform implementation. Instead whenever SetMockPosition is
-// called this class will compare the provided position with all currently
-// registered regions, and emit corresponding geofencing events.
-//
-// If an instance is created with |service_available| set to false, the mock
-// will behave as if the platform does not support geofencing.
-class MockGeofencingService : public GeofencingService {
- public:
- explicit MockGeofencingService(bool service_available);
- ~MockGeofencingService() override;
-
- void SetMockPosition(double latitude, double longitude);
-
- // GeofencingService implementation.
- bool IsServiceAvailable() override;
- int64_t RegisterRegion(const blink::WebCircularGeofencingRegion& region,
- GeofencingRegistrationDelegate* delegate) override;
- void UnregisterRegion(int64_t geofencing_registration_id) override;
-
- private:
- struct Registration;
-
- bool available_;
- std::map<int64_t, Registration> registrations_;
- int64_t next_id_;
- bool has_position_;
- double last_latitude_;
- double last_longitude_;
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
« no previous file with comments | « content/browser/geofencing/geofencing_service_unittest.cc ('k') | content/browser/geofencing/mock_geofencing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698