New issue
Advanced search Search tips

Issue 809680 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 4
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 696822



Sign in to add a comment

Support Click to Script with Declarative Net Request API

Project Member Reported by karandeepb@chromium.org, Feb 6 2018

Issue description

Determine how ACCESS_WITHHELD should be handled.
 
Components: Platform>Extensions
Cc: -rdevlin....@chromium.org
Owner: rdevlin....@chromium.org
Devlin: Assigning this to you for now. I believe the handling would be similar for both DNR and the Web request API.
Owner: karandeepb@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/967bd538415e1a121567016a2fcf39b0c2a7165c

commit 967bd538415e1a121567016a2fcf39b0c2a7165c
Author: Karan Bhatia <karandeepb@chromium.org>
Date: Tue Oct 02 21:08:55 2018

Extensions: Delete WebRequestEventRouterDelegate.

This CL deletes WebRequestEventRouterDelegate and its implementation
ChromeExtensionWebRequestEventRouterDelegate. It's only method,
NotifyWebRequestWithheld is replaced with a method on the ExtensionsAPIClient.
This will make it easier to share the implementation with the Declarative Net
Request API.

This CL should have no behavior change.

BUG= 809680 

Change-Id: I696dbf8d3a34ae546342eb7ba98a1dd9e26fe3aa
Reviewed-on: https://chromium-review.googlesource.com/c/1256218
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595979}
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/chrome/browser/extensions/BUILD.gn
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/chrome/browser/extensions/api/chrome_extensions_api_client.cc
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/chrome/browser/extensions/api/chrome_extensions_api_client.h
[delete] https://crrev.com/20b13dfd330625d838904634078a0f1b31ea6335/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
[delete] https://crrev.com/20b13dfd330625d838904634078a0f1b31ea6335/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/extensions/browser/api/extensions_api_client.cc
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/extensions/browser/api/extensions_api_client.h
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/extensions/browser/api/web_request/BUILD.gn
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/967bd538415e1a121567016a2fcf39b0c2a7165c/extensions/browser/api/web_request/web_request_api.h
[delete] https://crrev.com/20b13dfd330625d838904634078a0f1b31ea6335/extensions/browser/api/web_request/web_request_event_router_delegate.h

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/229a1a82aee6661e13a9cfac6779cd70f42b0d15

commit 229a1a82aee6661e13a9cfac6779cd70f42b0d15
Author: Karan Bhatia <karandeepb@chromium.org>
Date: Thu Oct 04 00:43:08 2018

Declarative Net Request: Support runtime host permissions.

This CL adds support for runtime host permissions to the Declarative Net Request
API. Changes:

- The behavior of REQUIRE_HOST_PERMISSION_FOR_URL_AND_INITIATOR is modified for
  the case when an extension has access to the initiator but the access to the
  request url is withheld. In this case, the extension is granted access to the
  request. This is similar to the current behavior of
  REQUIRE_HOST_PERMISSION_FOR_URL (used by web request API) and necessary for
  runtime host permissions to work. This allows extensions to intercept withheld
  cross-origin requests from a frame to which they have access.
- RulesetManager is modified to notify the chrome layer that access to a request
  was withheld. This is necessary for us to track an extension's
  blocked/withheld actions on a tab.

This CL also paves the way to transition the web request API to require host
permissions to the initiator i.e. REQUIRE_HOST_PERMISSION_FOR_URL_AND_INITIATOR.

BUG=157736,  809680 

Change-Id: Ic4737a55a3ad6f88625149bcb39eefeb84df7d91
Reviewed-on: https://chromium-review.googlesource.com/c/1256219
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596450}
[modify] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc
[add] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/chrome/test/data/extensions/declarative_net_request/cross_site_script.html
[modify] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/extensions/browser/api/declarative_net_request/ruleset_manager.cc
[modify] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/extensions/browser/api/declarative_net_request/ruleset_manager.h
[modify] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/extensions/browser/api/web_request/web_request_permissions.cc
[modify] https://crrev.com/229a1a82aee6661e13a9cfac6779cd70f42b0d15/extensions/browser/api/web_request/web_request_permissions_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment