Chromium Code Reviews| Index: Source/web/WebGeolocationPermissionRequestManager.cpp |
| diff --git a/Source/web/WebGeolocationPermissionRequestManager.cpp b/Source/web/WebGeolocationPermissionRequestManager.cpp |
| index ed8b1d7d017aabd0f34c5add11278f270c01d87f..e4dae0830eb6a5afb05d77405cd8cc351fea650c 100644 |
| --- a/Source/web/WebGeolocationPermissionRequestManager.cpp |
| +++ b/Source/web/WebGeolocationPermissionRequestManager.cpp |
| @@ -46,7 +46,8 @@ int WebGeolocationPermissionRequestManager::add(const blink::WebGeolocationPermi |
| { |
| Geolocation* geolocation = permissionRequest.geolocation(); |
| ASSERT(!m_private->m_geolocationIdMap.contains(geolocation)); |
| - int id = ++m_lastId; |
| + static int lastId; |
|
dglazkov
2014/05/30 18:31:42
Ideally, there's a static function that vends ids.
|
| + int id = ++lastId; |
| m_private->m_geolocationIdMap.add(geolocation, id); |
| m_private->m_idGeolocationMap.add(id, geolocation); |
| return id; |
| @@ -78,7 +79,6 @@ bool WebGeolocationPermissionRequestManager::remove(int id, blink::WebGeolocatio |
| void WebGeolocationPermissionRequestManager::init() |
| { |
| - m_lastId = 0; |
| m_private.reset(new WebGeolocationPermissionRequestManagerPrivate); |
| } |