| 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 69%
|
| copy from device/geolocation/mock_location_provider.h
|
| copy to device/geolocation/fake_location_provider.h
|
| index c3357103f03ebc35c7c8430d2c259af9f23594c6..479a5cfbf8d5acce36309c9bb03e6a0088235f2b 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,13 +15,13 @@
|
|
|
| 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;
|
| + FakeLocationProvider();
|
| + ~FakeLocationProvider() override;
|
|
|
| // Updates listeners with the new position.
|
| void HandlePositionChanged(const Geoposition& position);
|
| @@ -37,27 +37,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();
|
|
|
| } // namespace device
|
|
|
| -#endif // DEVICE_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_
|
| +#endif // DEVICE_GEOLOCATION_FAKE_LOCATION_PROVIDER_H_
|
|
|