1 // Copyright 2015 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/permissions/permission_request_id.h"
7 #include "base/strings/stringprintf.h"
9 PermissionRequestID::PermissionRequestID(int render_process_id
,
12 : render_process_id_(render_process_id
),
13 render_frame_id_(render_frame_id
),
14 request_id_(request_id
) {
17 PermissionRequestID::~PermissionRequestID() {
20 bool PermissionRequestID::operator==(const PermissionRequestID
& other
) const {
21 return render_process_id_
== other
.render_process_id_
&&
22 render_frame_id_
== other
.render_frame_id_
&&
23 request_id_
== other
.request_id_
;
26 bool PermissionRequestID::operator!=(const PermissionRequestID
& other
) const {
27 return !operator==(other
);
30 std::string
PermissionRequestID::ToString() const {
31 return base::StringPrintf("%d,%d,%d",