Chrome seems to be very accurate in detecting my location. How does it do it? Can you point me to the source code?
Geolocation can be calculated based on:
See the W3C Geolocaton API and Google Gears API (which Chrome's/W3C Geolocation API is based on).
Chromium's geolocation source code can be viewed online.