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

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

Issue 645763003: Refactor GeofencingManager to have one instance per StoragePartition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 2 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/geofencing_provider.h
diff --git a/content/browser/geofencing/geofencing_provider.h b/content/browser/geofencing/geofencing_provider.h
index ab5faa079a105345dd0695890a9429ad5d5d98d4..dec96b5270b2b36014b6d0b3cb0768a242fbda10 100644
--- a/content/browser/geofencing/geofencing_provider.h
+++ b/content/browser/geofencing/geofencing_provider.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_PROVIDER_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_PROVIDER_H_
+#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "content/common/geofencing_status.h"
@@ -16,28 +17,26 @@ namespace content {
class GeofencingProvider {
public:
- // Callback that gets called on completion of registering a new region. The
- // status indicates success or failure, and in case of success, an id to use
- // to later unregister the region is passed as |registration_id|. If
- // registration failed, providers should set |registration_id| to -1.
- typedef base::Callback<void(GeofencingStatus, int registration_id)>
- RegisterCallback;
+ typedef base::Callback<void(GeofencingStatus)> StatusCallback;
virtual ~GeofencingProvider() {}
- // Called by |GeofencingManager| to register a new fence. GeofencingManager is
+ // Called by |GeofencingService| to register a new fence. GeofencingService is
// responsible for handling things like duplicate regions, so platform
// specific implementations shouldn't have to worry about things like that.
- // Also GeofencingManager should be making sure the total number of geofences
+ // Also GeofencingService should be making sure the total number of geofences
// that is registered with the platform specific provider does not exceed the
// number of regions supported by the platform, although that isn't
// implemented yet.
- virtual void RegisterRegion(const blink::WebCircularGeofencingRegion& region,
- const RegisterCallback& callback) = 0;
+ // Implementations of RegisterRegion must asynchronously call the |callback|
+ // to indicate success or failure.
+ virtual void RegisterRegion(int64 geofencing_registration_id,
+ const blink::WebCircularGeofencingRegion& region,
+ const StatusCallback& callback) = 0;
- // Called by |GeofencingManager| to unregister an existing registration. Will
+ // Called by |GeofencingService| to unregister an existing registration. Will
// only be called once for each registration.
- virtual void UnregisterRegion(int registration_id) = 0;
+ virtual void UnregisterRegion(int64 geofencing_registration_id) = 0;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698