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

Unified Diff: content/browser/permissions/permission_service_context.cc

Issue 792173002: Revert of Implement HasPermission() method in PermissionService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/permissions/permission_service_context.cc
diff --git a/content/browser/permissions/permission_service_context.cc b/content/browser/permissions/permission_service_context.cc
index 50c73a92e382a46af2805b9bab29a6c4238c878c..2c7e91b968458265036ccae92049e97481b99138 100644
--- a/content/browser/permissions/permission_service_context.cc
+++ b/content/browser/permissions/permission_service_context.cc
@@ -7,7 +7,6 @@
#include "content/browser/permissions/permission_service_impl.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
namespace content {
@@ -15,15 +14,7 @@
PermissionServiceContext::PermissionServiceContext(
RenderFrameHost* render_frame_host)
: WebContentsObserver(WebContents::FromRenderFrameHost(render_frame_host)),
- render_frame_host_(render_frame_host),
- render_process_host_(nullptr) {
-}
-
-PermissionServiceContext::PermissionServiceContext(
- RenderProcessHost* render_process_host)
- : WebContentsObserver(nullptr),
- render_frame_host_(nullptr),
- render_process_host_(render_process_host) {
+ render_frame_host_(render_frame_host) {
}
PermissionServiceContext::~PermissionServiceContext() {
@@ -69,17 +60,4 @@
service->CancelPendingRequests();
}
-BrowserContext* PermissionServiceContext::GetBrowserContext() const {
- if (!web_contents()) {
- DCHECK(render_process_host_);
- return render_process_host_->GetBrowserContext();
- }
- return web_contents()->GetBrowserContext();
-}
-
-GURL PermissionServiceContext::GetEmbeddingOrigin() const {
- return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin()
- : GURL();
-}
-
} // namespace content
« no previous file with comments | « content/browser/permissions/permission_service_context.h ('k') | content/browser/permissions/permission_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698