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 #ifndef CHROME_BROWSER_CHROMEOS_GEOLOCATION_GEOPOSITION_H_ | 5 #ifndef CHROMEOS_GEOLOCATION_GEOPOSITION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GEOLOCATION_GEOPOSITION_H_ | 6 #define CHROMEOS_GEOLOCATION_GEOPOSITION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "chromeos/chromeos_export.h" |
11 | 12 |
12 namespace chromeos { | 13 namespace chromeos { |
13 | 14 |
14 // This structure represents Google Maps Geolocation response. | 15 // This structure represents Google Maps Geolocation response. |
15 // Based on content/public/common/geoposition.h . | 16 // Based on content/public/common/geoposition.h . |
16 struct Geoposition { | 17 struct CHROMEOS_EXPORT Geoposition { |
17 // Geolocation API client status. | 18 // Geolocation API client status. |
18 // (Server status is reported in "error_code" field.) | 19 // (Server status is reported in "error_code" field.) |
19 enum Status { | 20 enum Status { |
20 STATUS_NONE, | 21 STATUS_NONE, |
21 STATUS_OK, // Response successful. | 22 STATUS_OK, // Response successful. |
22 STATUS_SERVER_ERROR, // Received error object. | 23 STATUS_SERVER_ERROR, // Received error object. |
23 STATUS_NETWORK_ERROR, // Received bad or no response. | 24 STATUS_NETWORK_ERROR, // Received bad or no response. |
24 STATUS_TIMEOUT, // Request stopped because of timeout. | 25 STATUS_TIMEOUT, // Request stopped because of timeout. |
25 STATUS_LAST = STATUS_TIMEOUT | 26 STATUS_LAST = STATUS_TIMEOUT |
26 }; | 27 }; |
(...skipping 28 matching lines...) Expand all Loading... |
55 // taken from the host computer's system clock (i.e. from Time::Now(), not the | 56 // taken from the host computer's system clock (i.e. from Time::Now(), not the |
56 // source device's clock). | 57 // source device's clock). |
57 base::Time timestamp; | 58 base::Time timestamp; |
58 | 59 |
59 // See enum above. | 60 // See enum above. |
60 Status status; | 61 Status status; |
61 }; | 62 }; |
62 | 63 |
63 } // namespace chromeos | 64 } // namespace chromeos |
64 | 65 |
65 #endif // CHROME_BROWSER_CHROMEOS_GEOLOCATION_GEOPOSITION_H_ | 66 #endif // CHROMEOS_GEOLOCATION_GEOPOSITION_H_ |
OLD | NEW |