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

Side by Side Diff: content/browser/permissions/permission_service_context.cc

Issue 1726323002: Have Permission{Manager,Service} use Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/permissions/permission_service_context.h" 5 #include "content/browser/permissions/permission_service_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/permissions/permission_service_impl.h" 9 #include "content/browser/permissions/permission_service_impl.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 BrowserContext* PermissionServiceContext::GetBrowserContext() const { 77 BrowserContext* PermissionServiceContext::GetBrowserContext() const {
78 if (!web_contents()) { 78 if (!web_contents()) {
79 DCHECK(render_process_host_); 79 DCHECK(render_process_host_);
80 return render_process_host_->GetBrowserContext(); 80 return render_process_host_->GetBrowserContext();
81 } 81 }
82 return web_contents()->GetBrowserContext(); 82 return web_contents()->GetBrowserContext();
83 } 83 }
84 84
85 GURL PermissionServiceContext::GetEmbeddingOrigin() const { 85 url::Origin PermissionServiceContext::GetEmbeddingOrigin() const {
86 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() 86 return web_contents() ? url::Origin(web_contents()->GetLastCommittedURL())
87 : GURL(); 87 : url::Origin();
88 } 88 }
89 89
90 RenderFrameHost* PermissionServiceContext::render_frame_host() const { 90 RenderFrameHost* PermissionServiceContext::render_frame_host() const {
91 return render_frame_host_; 91 return render_frame_host_;
92 } 92 }
93 93
94 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/permissions/permission_service_context.h ('k') | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698