OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/geolocation/geoposition.h" | 5 #include "chromeos/geolocation/geoposition.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 // Sentinel values to mark invalid data. | 11 // Sentinel values to mark invalid data. |
12 const double kBadLatitudeLongitude = 200; | 12 const double kBadLatitudeLongitude = 200; |
13 const int kBadAccuracy = -1; // Accuracy must be non-negative. | 13 const int kBadAccuracy = -1; // Accuracy must be non-negative. |
14 | 14 |
15 } // namespace | 15 } // namespace |
(...skipping 26 matching lines...) Expand all Loading... |
42 return base::StringPrintf( | 42 return base::StringPrintf( |
43 "latitude=%f, longitude=%f, accuracy=%f, error_code=%u, " | 43 "latitude=%f, longitude=%f, accuracy=%f, error_code=%u, " |
44 "error_message='%s', status=%u (%s)", | 44 "error_message='%s', status=%u (%s)", |
45 latitude, | 45 latitude, |
46 longitude, | 46 longitude, |
47 accuracy, | 47 accuracy, |
48 error_code, | 48 error_code, |
49 error_message.c_str(), | 49 error_message.c_str(), |
50 (unsigned)status, | 50 (unsigned)status, |
51 (status < arraysize(status2string) ? status2string[status] : "unknown")); | 51 (status < arraysize(status2string) ? status2string[status] : "unknown")); |
52 }; | 52 } |
53 | 53 |
54 } // namespace chromeos | 54 } // namespace chromeos |
OLD | NEW |