Commit 67b6579f authored by jam@chromium.org's avatar jam@chromium.org

Make the bridge_id in WebGeolocationPermissionRequestManager be unique per process.

Right now it's unique per view, but as part of converting the content side code to use frames instead of views in https://codereview.chromium.org/303503008/ we need this to be unique per view. That can change back in the future once all the permission-related code in the browser (PermissionRequestID in particular) is converted.

BUG=304341

Review URL: https://codereview.chromium.org/301183005

git-svn-id: svn://svn.chromium.org/blink/trunk@175167 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8031abcb
......@@ -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;
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);
}
......
......@@ -54,7 +54,6 @@ private:
BLINK_EXPORT void reset();
WebPrivateOwnPtr<WebGeolocationPermissionRequestManagerPrivate> m_private;
int m_lastId;
};
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment