| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   69 void GeoNotifier::startTimer() |   69 void GeoNotifier::startTimer() | 
|   70 { |   70 { | 
|   71     m_timer.startOneShot(m_options.timeout() / 1000.0, BLINK_FROM_HERE); |   71     m_timer.startOneShot(m_options.timeout() / 1000.0, BLINK_FROM_HERE); | 
|   72 } |   72 } | 
|   73  |   73  | 
|   74 void GeoNotifier::stopTimer() |   74 void GeoNotifier::stopTimer() | 
|   75 { |   75 { | 
|   76     m_timer.stop(); |   76     m_timer.stop(); | 
|   77 } |   77 } | 
|   78  |   78  | 
|   79 void GeoNotifier::timerFired(Timer<GeoNotifier>*) |   79 void GeoNotifier::timerFired(TimerBase*) | 
|   80 { |   80 { | 
|   81     m_timer.stop(); |   81     m_timer.stop(); | 
|   82  |   82  | 
|   83     // Test for fatal error first. This is required for the case where the Local
     Frame is |   83     // Test for fatal error first. This is required for the case where the Local
     Frame is | 
|   84     // disconnected and requests are cancelled. |   84     // disconnected and requests are cancelled. | 
|   85     if (m_fatalError) { |   85     if (m_fatalError) { | 
|   86         runErrorCallback(m_fatalError); |   86         runErrorCallback(m_fatalError); | 
|   87         // This will cause this notifier to be deleted. |   87         // This will cause this notifier to be deleted. | 
|   88         m_geolocation->fatalErrorOccurred(this); |   88         m_geolocation->fatalErrorOccurred(this); | 
|   89         return; |   89         return; | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|  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::TIMEOU
     T, "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 |