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

Unified Diff: Source/web/WebGeolocationPermissionRequestManager.cpp

Issue 301183005: Make the bridge_id in WebGeolocationPermissionRequestManager be unique per process. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebGeolocationPermissionRequestManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | public/web/WebGeolocationPermissionRequestManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698