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

Unified Diff: chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc

Issue 378873002: Move permission check from GuestViewInternal to derived GuestView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_meat
Patch Set: Diff against tip of tree Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/guest_view/app_view/app_view_guest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc
diff --git a/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc b/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc
index ef09b5baa88ef6e8496aa9f23d70bc1e57dd6b11..98f693cf62c8a129b66e9c4ba3829a88dae905e3 100644
--- a/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc
+++ b/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc
@@ -12,12 +12,6 @@
#include "content/public/browser/render_view_host.h"
#include "extensions/common/permissions/permissions_data.h"
-namespace {
-const char* kPermissionRequiredError =
- "\"webview\" or \"appview\" permission is required for allocating "
- "instance ID.";
-} // namespace
-
namespace extensions {
GuestViewInternalCreateGuestFunction::
@@ -31,15 +25,6 @@ bool GuestViewInternalCreateGuestFunction::RunAsync() {
base::DictionaryValue* create_params;
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &create_params));
- const PermissionsData* permissions_data = GetExtension()->permissions_data();
- if (!permissions_data->HasAPIPermission(APIPermission::kWebView) &&
- !permissions_data->HasAPIPermission(APIPermission::kAppView)) {
- LOG(ERROR) << kPermissionRequiredError;
- error_ = kPermissionRequiredError;
- SendResponse(false);
- return true;
- }
-
GuestViewManager* guest_view_manager =
GuestViewManager::FromBrowserContext(browser_context());
« no previous file with comments | « no previous file | chrome/browser/guest_view/app_view/app_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698