Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1837)

Unified Diff: device/geolocation/geoposition.cc

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/geolocation/geoposition.h ('k') | device/geolocation/location_api_adapter_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/geoposition.cc
diff --git a/device/geolocation/geoposition.cc b/device/geolocation/geoposition.cc
deleted file mode 100644
index a97183007e65a5b9b825482dc463ff99a79b0da5..0000000000000000000000000000000000000000
--- a/device/geolocation/geoposition.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 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 "device/geolocation/geoposition.h"
-
-namespace {
-// Sentinel values to mark invalid data. (WebKit carries companion is_valid
-// bools for this purpose; we may eventually follow that approach, but
-// sentinels worked OK in the Gears code this is based on.)
-const double kBadLatitudeLongitude = 200;
-// Lowest point on land is at approximately -400 meters.
-const int kBadAltitude = -10000;
-const int kBadAccuracy = -1; // Accuracy must be non-negative.
-const int kBadHeading = -1; // Heading must be non-negative.
-const int kBadSpeed = -1;
-}
-
-namespace device {
-
-Geoposition::Geoposition()
- : latitude(kBadLatitudeLongitude),
- longitude(kBadLatitudeLongitude),
- altitude(kBadAltitude),
- accuracy(kBadAccuracy),
- altitude_accuracy(kBadAccuracy),
- heading(kBadHeading),
- speed(kBadSpeed),
- error_code(ERROR_CODE_NONE) {
-}
-
-Geoposition::Geoposition(const Geoposition& other) = default;
-
-bool Geoposition::Validate() const {
- return latitude >= -90. && latitude <= 90. &&
- longitude >= -180. && longitude <= 180. &&
- accuracy >= 0. &&
- !timestamp.is_null();
-}
-
-} // namespace device
« no previous file with comments | « device/geolocation/geoposition.h ('k') | device/geolocation/location_api_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698