Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / permissions / permission_request_id.cc
blob9a994859050b75bd2c9cba9a63f6c78dec421f4f
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 : 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",
32 render_process_id_,
33 render_frame_id_,
34 request_id_);