Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: Source/modules/geolocation/GeoNotifier.cpp

Issue 402483003: Remove never reached area in GeoNotifier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove_circular
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "modules/geolocation/GeoNotifier.h" 6 #include "modules/geolocation/GeoNotifier.h"
7 7
8 #include "modules/geolocation/Geolocation.h" 8 #include "modules/geolocation/Geolocation.h"
9 #include "modules/geolocation/PositionCallback.h" 9 #include "modules/geolocation/PositionCallback.h"
10 #include "modules/geolocation/PositionError.h" 10 #include "modules/geolocation/PositionError.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void GeoNotifier::setUseCachedPosition() 51 void GeoNotifier::setUseCachedPosition()
52 { 52 {
53 m_useCachedPosition = true; 53 m_useCachedPosition = true;
54 m_timer.startOneShot(0, FROM_HERE); 54 m_timer.startOneShot(0, FROM_HERE);
55 } 55 }
56 56
57 void GeoNotifier::runSuccessCallback(Geoposition* position) 57 void GeoNotifier::runSuccessCallback(Geoposition* position)
58 { 58 {
59 // If we are here and the Geolocation permission is not approved, something has
60 // gone horribly wrong.
61 if (!m_geolocation->isAllowed())
62 CRASH();
Michael van Ouwerkerk 2014/07/17 10:15:00 I'd have prefered to just replace this with ASSERT
kihong 2014/07/17 11:47:55 There are only two way to get here.(from makeCache
Michael van Ouwerkerk 2014/07/17 12:15:34 Your change is correct. If the purpose is the brea
kihong 2014/07/17 12:21:10 I got it and thanks for your kind reviewing. :)
63
64 m_successCallback->handleEvent(position); 59 m_successCallback->handleEvent(position);
65 } 60 }
66 61
67 void GeoNotifier::runErrorCallback(PositionError* error) 62 void GeoNotifier::runErrorCallback(PositionError* error)
68 { 63 {
69 if (m_errorCallback) 64 if (m_errorCallback)
70 m_errorCallback->handleEvent(error); 65 m_errorCallback->handleEvent(error);
71 } 66 }
72 67
73 void GeoNotifier::startTimer() 68 void GeoNotifier::startTimer()
(...skipping 26 matching lines...) Expand all
100 m_geolocation->requestUsesCachedPosition(this); 95 m_geolocation->requestUsesCachedPosition(this);
101 return; 96 return;
102 } 97 }
103 98
104 if (m_errorCallback) 99 if (m_errorCallback)
105 m_errorCallback->handleEvent(PositionError::create(PositionError::TIMEOU T, "Timeout expired")); 100 m_errorCallback->handleEvent(PositionError::create(PositionError::TIMEOU T, "Timeout expired"));
106 m_geolocation->requestTimedOut(this); 101 m_geolocation->requestTimedOut(this);
107 } 102 }
108 103
109 } // namespace WebCore 104 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698