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

Side by Side Diff: components/content_settings/core/common/permission_request_id.h

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
(Empty)
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.
4
5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_
7
8 #include <string>
9
10 #include "url/gurl.h"
11
12 // Uniquely identifies a particular permission request.
13 class PermissionRequestID {
14 public:
15 PermissionRequestID(int render_process_id,
16 int render_frame_id,
17 int bridge_id,
18 const GURL& origin);
19 ~PermissionRequestID();
20
21 int render_process_id() const { return render_process_id_; }
22 int render_frame_id() const { return render_frame_id_; }
23 int bridge_id() const { return bridge_id_; }
24 GURL origin() const { return origin_; }
25
26 bool Equals(const PermissionRequestID& other) const;
27 std::string ToString() const;
28
29 private:
30 int render_process_id_;
31 int render_frame_id_;
32 // Id unique to this instance.
33 int bridge_id_;
34 // Needed for permission checks that are based on origin.
35 // If you don't use origin to check permission request, pass an empty GURL.
36 GURL origin_;
37
38 // Purposefully do not disable copying, as this is stored in STL containers.
39 };
40
41 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_
OLDNEW
« no previous file with comments | « components/content_settings/core/common/BUILD.gn ('k') | components/content_settings/core/common/permission_request_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698