blob: 52fcb4f9ea5aeb401ca623fc3c9d62461007d435 [file] [log] [blame]
// Copyright (c) 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/device/public/cpp/geolocation/geoposition.h"
namespace device {
bool ValidateGeoposition(const mojom::Geoposition& position) {
return position.latitude >= -90. && position.latitude <= 90. &&
position.longitude >= -180. && position.longitude <= 180. &&
position.accuracy >= 0. && !position.timestamp.is_null();
}
} // namespace device