Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: chrome/browser/permissions/permission_request_id.cc

Issue 1166603002: Move PermissionRequestID to chrome/browser/permissions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_rfh
Patch Set: fix build Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/content_settings/core/common/permission_request_id.h" 5 #include "chrome/browser/permissions/permission_request_id.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 8
9 PermissionRequestID::PermissionRequestID(int render_process_id, 9 PermissionRequestID::PermissionRequestID(int render_process_id,
10 int render_frame_id, 10 int render_frame_id,
11 int bridge_id, 11 int request_id,
12 const GURL& origin) 12 const GURL& origin)
13 : render_process_id_(render_process_id), 13 : render_process_id_(render_process_id),
14 render_frame_id_(render_frame_id), 14 render_frame_id_(render_frame_id),
15 bridge_id_(bridge_id), 15 request_id_(request_id),
16 origin_(origin) { 16 origin_(origin) {
17 } 17 }
18 18
19 PermissionRequestID::~PermissionRequestID() { 19 PermissionRequestID::~PermissionRequestID() {
20 } 20 }
21 21
22 bool PermissionRequestID::Equals(const PermissionRequestID& other) const { 22 bool PermissionRequestID::operator==(const PermissionRequestID& other) const {
23 return render_process_id_ == other.render_process_id_ && 23 return render_process_id_ == other.render_process_id_ &&
24 render_frame_id_ == other.render_frame_id_ && 24 render_frame_id_ == other.render_frame_id_ &&
25 bridge_id_ == other.bridge_id_ && 25 request_id_ == other.request_id_ &&
26 origin_ == other.origin_; 26 origin_ == other.origin_;
27 } 27 }
28 28
29 bool PermissionRequestID::operator!=(const PermissionRequestID& other) const {
30 return !operator==(other);
31 }
32
29 std::string PermissionRequestID::ToString() const { 33 std::string PermissionRequestID::ToString() const {
30 return base::StringPrintf("%d,%d,%d,%s", 34 return base::StringPrintf("%d,%d,%d,%s",
31 render_process_id_, 35 render_process_id_,
32 render_frame_id_, 36 render_frame_id_,
33 bridge_id_, 37 request_id_,
34 origin_.spec().c_str()); 38 origin_.spec().c_str());
35 } 39 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_request_id.h ('k') | chrome/browser/push_messaging/push_messaging_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698