| 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 "modules/geolocation/GeoNotifier.h" | 5 #include "modules/geolocation/GeoNotifier.h" |
| 6 | 6 |
| 7 #include "modules/geolocation/Geolocation.h" | 7 #include "modules/geolocation/Geolocation.h" |
| 8 #include "modules/geolocation/PositionError.h" | 8 #include "modules/geolocation/PositionError.h" |
| 9 #include "modules/geolocation/PositionOptions.h" | 9 #include "modules/geolocation/PositionOptions.h" |
| 10 #include "platform/Histogram.h" | 10 #include "platform/Histogram.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 if (m_useCachedPosition) { | 92 if (m_useCachedPosition) { |
| 93 // Clear the cached position flag in case this is a watch request, which | 93 // Clear the cached position flag in case this is a watch request, which |
| 94 // will continue to run. | 94 // will continue to run. |
| 95 m_useCachedPosition = false; | 95 m_useCachedPosition = false; |
| 96 m_geolocation->requestUsesCachedPosition(this); | 96 m_geolocation->requestUsesCachedPosition(this); |
| 97 return; | 97 return; |
| 98 } | 98 } |
| 99 | 99 |
| 100 if (m_errorCallback) | 100 if (m_errorCallback) |
| 101 m_errorCallback->handleEvent(PositionError::create(PositionError::TIMEOU
T, "Timeout expired")); | 101 m_errorCallback->handleEvent(PositionError::create(PositionError::kTimeo
ut, "Timeout expired")); |
| 102 | 102 |
| 103 DEFINE_STATIC_LOCAL(CustomCountHistogram, timeoutExpiredHistogram, ("Geoloca
tion.TimeoutExpired", 0, 1000 * 60 * 10 /* 10 minute max */, 20 /* buckets */)); | 103 DEFINE_STATIC_LOCAL(CustomCountHistogram, timeoutExpiredHistogram, ("Geoloca
tion.TimeoutExpired", 0, 1000 * 60 * 10 /* 10 minute max */, 20 /* buckets */)); |
| 104 timeoutExpiredHistogram.count(m_options.timeout()); | 104 timeoutExpiredHistogram.count(m_options.timeout()); |
| 105 | 105 |
| 106 m_geolocation->requestTimedOut(this); | 106 m_geolocation->requestTimedOut(this); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |