// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_DEVICE_PUBLIC_CPP_TEST_SCOPED_GEOLOCATION_OVERRIDER_H_ #define SERVICES_DEVICE_PUBLIC_CPP_TEST_SCOPED_GEOLOCATION_OVERRIDER_H_ #include "base/functional/bind.h" #include "services/device/public/mojom/geoposition.mojom.h" namespace device { // A helper class which owns a FakeGeolocationContext by which the geolocation // is overriden to a given position or latitude and longitude values. // The FakeGeolocationContext overrides the binder of Device Service by // service_manager::ServiceContext::SetGlobalBinderForTesting(). // The override of the geolocation implementation will be in effect for the // duration of this object's lifetime. // // Note that for this override to work properly, it must be constructed in the // same process that runs the Device Service implementation. class ScopedGeolocationOverrider { … }; } // namespace device #endif // SERVICES_DEVICE_PUBLIC_CPP_TEST_SCOPED_GEOLOCATION_OVERRIDER_H_