Index: device/geolocation/fake_location_provider.h |
diff --git a/device/geolocation/mock_location_provider.h b/device/geolocation/fake_location_provider.h |
similarity index 70% |
copy from device/geolocation/mock_location_provider.h |
copy to device/geolocation/fake_location_provider.h |
index d78b4ae2c1e83064125626f85a854375e190b955..473844e830c946e4236c42c958f263f7c5c6da60 100644 |
--- a/device/geolocation/mock_location_provider.h |
+++ b/device/geolocation/fake_location_provider.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef DEVICE_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ |
-#define DEVICE_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ |
+#ifndef DEVICE_GEOLOCATION_FAKE_LOCATION_PROVIDER_H_ |
+#define DEVICE_GEOLOCATION_FAKE_LOCATION_PROVIDER_H_ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
@@ -15,19 +15,19 @@ |
namespace device { |
-// Mock implementation of a location provider for testing. |
-class MockLocationProvider : public LocationProviderBase { |
+// Fake implementation of a location provider for testing. |
+class FakeLocationProvider : public LocationProviderBase { |
public: |
enum State { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_; |
- MockLocationProvider(); |
- ~MockLocationProvider() override; |
- |
- bool IsProviderStarted() const; |
+ FakeLocationProvider(); |
+ ~FakeLocationProvider() override; |
// Updates listeners with the new position. |
void HandlePositionChanged(const Geoposition& position); |
+ bool IsProviderStarted() const; |
Wez
2016/08/19 18:50:25
nit: See comments in other CL re making this a sim
CJ
2016/08/19 22:22:34
Done. Let me know if this is what was intended.
|
+ |
// LocationProvider implementation. |
bool StartProvider(bool high_accuracy) override; |
void StopProvider() override; |
@@ -39,27 +39,27 @@ class MockLocationProvider : public LocationProviderBase { |
scoped_refptr<base::SingleThreadTaskRunner> provider_task_runner_; |
private: |
- DISALLOW_COPY_AND_ASSIGN(MockLocationProvider); |
+ DISALLOW_COPY_AND_ASSIGN(FakeLocationProvider); |
}; |
// Factory functions for the various sorts of mock location providers, |
// for use with LocationArbitrator::SetProviderFactoryForTest (i.e. |
// not intended for test code to use to get access to the mock, you can use |
-// MockLocationProvider::instance_ for this, or make a custom factory method). |
+// FakeLocationProvider::instance_ for this, or make a custom factory method). |
// Creates a mock location provider with no default behavior. |
-LocationProvider* NewMockLocationProvider(); |
+LocationProvider* NewFakeLocationProvider(); |
// Creates a mock location provider that automatically notifies its |
// listeners with a valid location when StartProvider is called. |
-LocationProvider* NewAutoSuccessMockLocationProvider(); |
+LocationProvider* NewAutoSuccessFakeLocationProvider(); |
// Creates a mock location provider that automatically notifies its |
// listeners with an error when StartProvider is called. |
-LocationProvider* NewAutoFailMockLocationProvider(); |
-// Similar to NewAutoSuccessMockLocationProvider but mimicks the behavior of |
+LocationProvider* NewAutoFailFakeLocationProvider(); |
+// Similar to NewAutoSuccessFakeLocationProvider but mimicks the behavior of |
// the Network Location provider, in deferring making location updates until |
// a permission request has been confirmed. |
-LocationProvider* NewAutoSuccessMockNetworkLocationProvider(); |
+LocationProvider* NewAutoSuccessFakeNetworkLocationProvider(); |
Wez
2016/08/19 18:50:25
Do any call-sites actually use these? I'd assume
CJ
2016/08/19 22:22:34
Yeah they are gone now.
|
} // namespace device |
-#endif // DEVICE_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ |
+#endif // DEVICE_GEOLOCATION_FAKE_LOCATION_PROVIDER_H_ |