| 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 "chromeos/timezone/timezone_request.h" | 5 #include "chromeos/timezone/timezone_request.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/sparse_histogram.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chromeos/geolocation/geoposition.h" | |
| 17 #include "google_apis/google_api_keys.h" | 16 #include "google_apis/google_api_keys.h" |
| 18 #include "net/base/escape.h" | 17 #include "net/base/escape.h" |
| 19 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
| 20 #include "net/http/http_status_code.h" | 19 #include "net/http/http_status_code.h" |
| 21 #include "net/url_request/url_fetcher.h" | |
| 22 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
| 23 #include "net/url_request/url_request_status.h" | 21 #include "net/url_request/url_request_status.h" |
| 24 | 22 |
| 25 namespace chromeos { | 23 namespace chromeos { |
| 26 | 24 |
| 27 namespace { | 25 namespace { |
| 28 | 26 |
| 29 const char kDefaultTimezoneProviderUrl[] = | 27 const char kDefaultTimezoneProviderUrl[] = |
| 30 "https://maps.googleapis.com/maps/api/timezone/json?"; | 28 "https://maps.googleapis.com/maps/api/timezone/json?"; |
| 31 | 29 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 dstOffset, | 419 dstOffset, |
| 422 rawOffset, | 420 rawOffset, |
| 423 timeZoneId.c_str(), | 421 timeZoneId.c_str(), |
| 424 timeZoneName.c_str(), | 422 timeZoneName.c_str(), |
| 425 error_message.c_str(), | 423 error_message.c_str(), |
| 426 (unsigned)status, | 424 (unsigned)status, |
| 427 (status < arraysize(status2string) ? status2string[status] : "unknown")); | 425 (status < arraysize(status2string) ? status2string[status] : "unknown")); |
| 428 } | 426 } |
| 429 | 427 |
| 430 } // namespace chromeos | 428 } // namespace chromeos |
| OLD | NEW |