1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/geolocation/geolocation_permission_request_id.h"
7 #include "base/stringprintf.h"
10 GeolocationPermissionRequestID::GeolocationPermissionRequestID(
11 int render_process_id
,
14 : render_process_id_(render_process_id
),
15 render_view_id_(render_view_id
),
16 bridge_id_(bridge_id
) {
19 GeolocationPermissionRequestID::~GeolocationPermissionRequestID() {
22 bool GeolocationPermissionRequestID::Equals(
23 const GeolocationPermissionRequestID
& other
) const {
24 return IsForSameTabAs(other
) && (bridge_id_
== other
.bridge_id_
);
27 bool GeolocationPermissionRequestID::IsForSameTabAs(
28 const GeolocationPermissionRequestID
& other
) const {
29 return (render_process_id_
== other
.render_process_id_
) &&
30 (render_view_id_
== other
.render_view_id_
);
33 std::string
GeolocationPermissionRequestID::ToString() const {
34 return base::StringPrintf("%d,%d,%d", render_process_id_
, render_view_id_
,