Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / content_settings / permission_request_id.cc
blob23c98d772fab7803876969429d9cad36940588b9
1 // Copyright 2013 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/content_settings/permission_request_id.h"
7 #include "base/strings/stringprintf.h"
10 PermissionRequestID::PermissionRequestID(int render_process_id,
11 int render_view_id,
12 int bridge_id,
13 int group_id)
14 : render_process_id_(render_process_id),
15 render_view_id_(render_view_id),
16 bridge_id_(bridge_id),
17 group_id_(group_id) {
20 PermissionRequestID::~PermissionRequestID() {
23 bool PermissionRequestID::Equals(const PermissionRequestID& other) const {
24 return IsForSameTabAs(other) && (bridge_id_ == other.bridge_id_);
27 bool PermissionRequestID::IsForSameTabAs(
28 const PermissionRequestID& other) const {
29 return (render_process_id_ == other.render_process_id_) &&
30 (render_view_id_ == other.render_view_id_);
33 std::string PermissionRequestID::ToString() const {
34 return base::StringPrintf("%d,%d,%d,%d",
35 render_process_id_,
36 render_view_id_,
37 bridge_id_,
38 group_id_);