From dfbf569c4c37aa656c9320abf837e4f0649661a5 Mon Sep 17 00:00:00 2001 From: mlamouri Date: Sat, 6 Jun 2015 11:53:41 -0700 Subject: Move PermissionRequestID to chrome/browser/permissions/. BUG=479227 Review URL: https://codereview.chromium.org/1166603002 Cr-Commit-Position: refs/heads/master@{#333219} --- components/content_settings/core/common/BUILD.gn | 2 -- .../core/common/permission_request_id.cc | 35 ------------------ .../core/common/permission_request_id.h | 41 ---------------------- 3 files changed, 78 deletions(-) delete mode 100644 components/content_settings/core/common/permission_request_id.cc delete mode 100644 components/content_settings/core/common/permission_request_id.h (limited to 'components/content_settings') diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn index 3784bc6..0570be8 100644 --- a/components/content_settings/core/common/BUILD.gn +++ b/components/content_settings/core/common/BUILD.gn @@ -11,8 +11,6 @@ static_library("common") { "content_settings_pattern_parser.cc", "content_settings_pattern_parser.h", "content_settings_types.h", - "permission_request_id.cc", - "permission_request_id.h", "pref_names.cc", "pref_names.h", ] diff --git a/components/content_settings/core/common/permission_request_id.cc b/components/content_settings/core/common/permission_request_id.cc deleted file mode 100644 index 7d7eccb..0000000 --- a/components/content_settings/core/common/permission_request_id.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/content_settings/core/common/permission_request_id.h" - -#include "base/strings/stringprintf.h" - -PermissionRequestID::PermissionRequestID(int render_process_id, - int render_frame_id, - int bridge_id, - const GURL& origin) - : render_process_id_(render_process_id), - render_frame_id_(render_frame_id), - bridge_id_(bridge_id), - origin_(origin) { -} - -PermissionRequestID::~PermissionRequestID() { -} - -bool PermissionRequestID::Equals(const PermissionRequestID& other) const { - return render_process_id_ == other.render_process_id_ && - render_frame_id_ == other.render_frame_id_ && - bridge_id_ == other.bridge_id_ && - origin_ == other.origin_; -} - -std::string PermissionRequestID::ToString() const { - return base::StringPrintf("%d,%d,%d,%s", - render_process_id_, - render_frame_id_, - bridge_id_, - origin_.spec().c_str()); -} diff --git a/components/content_settings/core/common/permission_request_id.h b/components/content_settings/core/common/permission_request_id.h deleted file mode 100644 index 6b798d4..0000000 --- a/components/content_settings/core/common/permission_request_id.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_ -#define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_ - -#include - -#include "url/gurl.h" - -// Uniquely identifies a particular permission request. -class PermissionRequestID { - public: - PermissionRequestID(int render_process_id, - int render_frame_id, - int bridge_id, - const GURL& origin); - ~PermissionRequestID(); - - int render_process_id() const { return render_process_id_; } - int render_frame_id() const { return render_frame_id_; } - int bridge_id() const { return bridge_id_; } - GURL origin() const { return origin_; } - - bool Equals(const PermissionRequestID& other) const; - std::string ToString() const; - - private: - int render_process_id_; - int render_frame_id_; - // Id unique to this instance. - int bridge_id_; - // Needed for permission checks that are based on origin. - // If you don't use origin to check permission request, pass an empty GURL. - GURL origin_; - - // Purposefully do not disable copying, as this is stored in STL containers. -}; - -#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_ -- cgit v1.1