diff options
author | mlamouri <mlamouri@chromium.org> | 2015-06-06 11:53:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-06 18:54:19 +0000 |
commit | dfbf569c4c37aa656c9320abf837e4f0649661a5 (patch) | |
tree | 1283adde690199a262c0892b1f3c4dcc1c800c2b /components/content_settings | |
parent | a1b62c42ab4a27a50107b0abdacb0d4b18b0b6a2 (diff) | |
download | chromium_src-dfbf569c4c37aa656c9320abf837e4f0649661a5.zip chromium_src-dfbf569c4c37aa656c9320abf837e4f0649661a5.tar.gz chromium_src-dfbf569c4c37aa656c9320abf837e4f0649661a5.tar.bz2 |
Move PermissionRequestID to chrome/browser/permissions/.
BUG=479227
Review URL: https://codereview.chromium.org/1166603002
Cr-Commit-Position: refs/heads/master@{#333219}
Diffstat (limited to 'components/content_settings')
3 files changed, 0 insertions, 78 deletions
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 <string> - -#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_ |