[go: nahoru, domu]

blob: aead54d9426f5d7bea4544c4b6c6963d011372d2 [file] [log] [blame]
// 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.
#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