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

Unified Diff: content/browser/geolocation/mock_location_provider.h

Issue 2028823002: Refactor to make BlimpLocationProvider accessible to content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes try issue Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/geolocation/mock_location_provider.h
diff --git a/content/browser/geolocation/mock_location_provider.h b/content/browser/geolocation/mock_location_provider.h
index ec1a9777313ee8e881e75ff4a6515c94054f57e6..7c3372e29190d115fdb3ecdb52765edf2948ce31 100644
--- a/content/browser/geolocation/mock_location_provider.h
+++ b/content/browser/geolocation/mock_location_provider.h
@@ -19,9 +19,9 @@ namespace content {
// Mock implementation of a location provider for testing.
class MockLocationProvider : public LocationProviderBase {
public:
- // Will update |*self_ref| to point to |this| on construction, and to NULL
- // on destruction.
- explicit MockLocationProvider(MockLocationProvider** self_ref);
+ enum State { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_;
+
+ MockLocationProvider();
~MockLocationProvider() override;
// Updates listeners with the new position.
@@ -33,16 +33,11 @@ class MockLocationProvider : public LocationProviderBase {
void GetPosition(Geoposition* position) override;
void OnPermissionGranted() override;
- Geoposition position_;
- enum State { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_;
bool is_permission_granted_;
- MockLocationProvider** self_ref_;
-
+ Geoposition position_;
scoped_refptr<base::SingleThreadTaskRunner> provider_task_runner_;
- // Set when an instance of the mock is created via a factory function.
- static MockLocationProvider* instance_;
-
+ private:
DISALLOW_COPY_AND_ASSIGN(MockLocationProvider);
};

Powered by Google App Engine
This is Rietveld 408576698