blob: c78bb100a071ca30c3666626aede7486056ae385 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/permissions/permission_request_id.h"
#include "base/strings/stringprintf.h"
PermissionRequestID::PermissionRequestID(int render_process_id,
int render_frame_id,
int request_id,
const GURL& origin)
: render_process_id_(render_process_id),
render_frame_id_(render_frame_id),
request_id_(request_id),
origin_(origin) {
}
PermissionRequestID::~PermissionRequestID() {
}
bool PermissionRequestID::operator==(const PermissionRequestID& other) const {
return render_process_id_ == other.render_process_id_ &&
render_frame_id_ == other.render_frame_id_ &&
request_id_ == other.request_id_ &&
origin_ == other.origin_;
}
bool PermissionRequestID::operator!=(const PermissionRequestID& other) const {
return !operator==(other);
}
std::string PermissionRequestID::ToString() const {
return base::StringPrintf("%d,%d,%d,%s",
render_process_id_,
render_frame_id_,
request_id_,
origin_.spec().c_str());
}
|