| 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/geolocation/simple_geolocation_request.h" | 5 #include "chromeos/geolocation/simple_geolocation_request.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
| 11 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 12 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
| 13 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 15 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 16 #include "base/values.h" | 18 #include "base/values.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 ? SIMPLE_GEOLOCATION_REQUEST_RESULT_SERVER_ERROR | 383 ? SIMPLE_GEOLOCATION_REQUEST_RESULT_SERVER_ERROR |
| 382 : SIMPLE_GEOLOCATION_REQUEST_RESULT_FAILURE); | 384 : SIMPLE_GEOLOCATION_REQUEST_RESULT_FAILURE); |
| 383 RecordUmaResult(result, retries_); | 385 RecordUmaResult(result, retries_); |
| 384 position_.status = Geoposition::STATUS_TIMEOUT; | 386 position_.status = Geoposition::STATUS_TIMEOUT; |
| 385 const base::TimeDelta elapsed = base::Time::Now() - request_started_at_; | 387 const base::TimeDelta elapsed = base::Time::Now() - request_started_at_; |
| 386 ReplyAndDestroySelf(elapsed, true /* server_error */); | 388 ReplyAndDestroySelf(elapsed, true /* server_error */); |
| 387 // "this" is already destroyed here. | 389 // "this" is already destroyed here. |
| 388 } | 390 } |
| 389 | 391 |
| 390 } // namespace chromeos | 392 } // namespace chromeos |
| OLD | NEW |