Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / permissions / permission_request_id.cc
blobc78bb100a071ca30c3666626aede7486056ae385
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,
10 int render_frame_id,
11 int request_id,
12 const GURL& origin)
13 : render_process_id_(render_process_id),
14 render_frame_id_(render_frame_id),
15 request_id_(request_id),
16 origin_(origin) {
19 PermissionRequestID::~PermissionRequestID() {
22 bool PermissionRequestID::operator==(const PermissionRequestID& other) const {
23 return render_process_id_ == other.render_process_id_ &&
24 render_frame_id_ == other.render_frame_id_ &&
25 request_id_ == other.request_id_ &&
26 origin_ == other.origin_;
29 bool PermissionRequestID::operator!=(const PermissionRequestID& other) const {
30 return !operator==(other);
33 std::string PermissionRequestID::ToString() const {
34 return base::StringPrintf("%d,%d,%d,%s",
35 render_process_id_,
36 render_frame_id_,
37 request_id_,
38 origin_.spec().c_str());