Commit Graph
152 Commits
Author SHA1 Message Date
Simon Hong 0d2a1a216d Deleted fingerprinting v2 feature flag
v2 is used by default.
2020-06-03 11:31:21 +09:00
Mark Pilgrim 147f1deae6 Fall through to upstream logic that allows some videos to autoplay muted
use anonymous namesapce
2020-06-02 15:08:12 -04:00
Mark Pilgrim 8bad4afcc8 Implement canvas blocking v2
tests

refactor

refactor

fix logic

header guard
2020-05-29 10:11:38 -04:00
Mark Pilgrim 6e71914a8b Implement fingerprint V2 for WebGL
tests
2020-05-27 13:34:12 -04:00
mkarolin eddcb26361 PermissionRequestManager moved to //components.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/5ca4ae16c0c1fe5e53de615ea680ff5779ab2dc4

commit 5ca4ae16c0c1fe5e53de615ea680ff5779ab2dc4
Author: Clark DuVall <cduvall@chromium.org>
Date:   Wed Feb 19 22:25:27 2020 +0000

    Move PermissionRequestManager to //components/permissions

    This required moving a few other classes:
    - NotificationPermissionUiSelector
    - PermissionPrompt
    - MockPermission*

    The GetDisplayNameOrOrigin() method which used to be part of
    PermissionPrompt::Delegate was moved to PermissionPromptBubbleView
    since that is the only place it's used.

    A set of unit tests was left in chrome which tests chrome-specific
    behavior of the PermissionRequestManager. The rest of the tests were
    moved into the component.

    Bug: 1025609
2020-05-26 09:52:29 -04:00
mkarolin 6aabdb5c0b PermissionContextBase moved to //components/permissions.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/a11361ad301b54774036b3f34856dd647747d6a1

commit a11361ad301b54774036b3f34856dd647747d6a1
Author: Clark DuVall <cduvall@chromium.org>
Date:   Thu Feb 20 22:14:27 2020 +0000

    Move PermissionContextBase to //components/permissions

    There is a slight difference in the code after refactoring:
    PermissionContextBase::IsPermissionAvailableToOrigins() now uses
    PermissionsClient::CanBypassEmbeddingOriginCheck() which checks both if
    the requesting scheme was chrome-extension or if the embedding origin
    was chrome://newtab. This is slightly different from the existing logic
    which only checks for chrome-extension. I believe this should be fine,
    since content::IsOriginSecure() returns true for chrome://newtab
    anyway. This small change allows us to use
    CanBypassEmbeddingOriginCheck() in
    PermissionContextBase::DecidePermission() as well, and avoids adding
    another method to PermissionsClient.

    Bug: 1025609
2020-05-26 09:52:28 -04:00
mkarolin 839df438a3 PermissionRequestImpl moved to //components.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/217fad8a27109428a373d61dac32e316e41c0e21

commit 217fad8a27109428a373d61dac32e316e41c0e21
Author: Clark DuVall <cduvall@chromium.org>
Date:   Wed Feb 19 19:58:00 2020 +0000

    Move PermissionRequestImpl to //components/permissions

    This required moving all the strings and icons that are referenced in
    PermissionRequestImpl as well. kProductIcon which is used for the
    PROTECTED_MEDIA_IDENTIFIER on ChromeOS was left in //chrome since
    kProductIcon is different depending on chrome branding.

    The IDR_* resources used on Android were moved in a way that still works
    with chrome's ResourceMapper. WebLayer will need a similar system to
    map the native IDR_* constants to Android drawable resources.

    Bug: 1025609
2020-05-26 09:52:27 -04:00
Francois Marier 858cd5859d Merge pull request #5545 from brave/francois-add-referrer-tests-7933
Add referrer test cases in preparation for overhaul
2020-05-21 20:56:04 -07:00
Mark Pilgrim 22a9f0a1fd Fix FarbleGetImageData tests 2020-05-20 22:36:19 -04:00
Francois Marier 022080203b Add tests for cross-site redirections 2020-05-13 19:06:18 -07:00
Francois Marier 690d6c8484 Add top-level navigation referrer tests 2020-05-13 19:06:18 -07:00
Francois Marier 11d775fba4 Add extra same-site tests 2020-05-13 17:44:42 -07:00
Francois Marier 9580f41483 Refactor existing tests 2020-05-13 17:31:36 -07:00
Mark Pilgrim a851e183be Implement content-sensitive canvas farbling
add missing patch

fewer patches

refactor content settings agent, add support for brave shields down, WIP browser tests

fix browser test

lint

types

lint

.
2020-05-07 11:04:39 -04:00
bridiver 68fe19e1ed temporarily disable farbling test
temporary fix for https://github.com/brave/brave-browser/issues/9433
2020-04-23 14:41:25 -07:00
bridiver 26939801f6 check for empty content setting rules
fix https://github.com/brave/brave-browser/issues/9421
2020-04-23 09:15:29 -07:00
bridiver 784459dfe3 fix lint 2020-04-22 16:19:25 -07:00
bridiver e13f545b55 update unit tests for fingerprinting v2 2020-04-22 14:36:27 -07:00
bridiver 26aad2cb22 put new fingerprinting settings behind a feature flag 2020-04-22 14:36:27 -07:00
Mark Pilgrim 80d44b5b88 . 2020-04-22 14:36:27 -07:00
Mark Pilgrim 2dec6e0089 Implement farbling levels
.

add content settings support

tests

lint

lint
2020-04-22 14:36:27 -07:00
Mark Pilgrim 2e45db2661 Perturb getImageData
also simplify session token generation code

deflake browser test

rebaes

update patch

lint

disable flaky test

.

typo
2020-03-31 17:03:58 -04:00
Mark Pilgrim 0e6f444d13 Stop blocking old canvas APIs 2020-03-25 11:08:13 -04:00
mkarolin 24f70b860f permission_request.h, permission_util.h/cc, etc. moved.
Redid patch of permission_util.h into a chromium_src override.
Updated various places with the new location of permission_* files.
Added permissions:: namespace where needed.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/484c25695c5f4a7cf7f2bf70ab1ab504a461c087

commit 484c25695c5f4a7cf7f2bf70ab1ab504a461c087
Author: Clark DuVall <cduvall@chromium.org>
Date:   Thu Jan 23 22:05:09 2020 +0000

    Create //components/permissions and move a few simple classes

    This creates the permissions component, and moves in PermissionRequest,
    PermissionRequestID, and PermissionResult.

    Most of the changes in //chrome were performed with sed:
    - change includes of moved classes from chrome/browser/permissions to
      components/permissions
    - add permissions:: namespace on moved classes

    Bug: 1025609

https://chromium.googlesource.com/chromium/src/+/732778e5d9ce46064ea5e759431bae13111007b6

commit 732778e5d9ce46064ea5e759431bae13111007b6
Author: Clark DuVall <cduvall@chromium.org>
Date:   Mon Jan 27 18:13:58 2020 +0000

    Move PermissionUtil into //components/permissions

    This also moves ScopedRevocationReporter into PermissionUmaUtil, since
    it seems to make more sense there and will be a bit more complicated to
    move to the component.

    Bug: 1025609
2020-03-19 16:51:27 -04:00
Mark Pilgrim 42989db307 change default video autoplay content setting
Remove external Brave-managed autoplay whitelist

lint

Delete chrome-VERSION.patch

.

fewer patches

update autoplay unit tests
2020-03-16 10:39:05 -04:00
mkarolin 86fe51646b Lint fixes. 2020-01-29 07:44:00 -05:00
mkarolin cdd955d0bc ContentSettingsObserver -> ContentSettingsAgentImpl.
Similarly, renamed BraveContentSettingsObserver and related files.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/2f8d810ec34e1b8a23b5003759d7f71b4ba00588

commit 2f8d810ec34e1b8a23b5003759d7f71b4ba00588
Author: Darin Fisher <darin@chromium.org>
Date:   Wed Oct 23 18:51:46 2019 +0000

    Convert content settings IPC over to Mojo

    This renamed ContentSettingsRenderer to ContentSettingsAgent and the corresponding
    class ContentSettingsObserver to ContentSettingsAgentImpl. This class represents
    the agent of the content settings system that runs in the renderer process. It is
    responsible for answering some of the blink::WebContentSettingsClient methods
    directly and for others it needs to delegate to the browser process. It does so
    through a new interface named ContentSettingsManager. This provides async and sync
    methods to check for permission to access different storage types.

    A big change here is that instead of answering these questions about storage
    access on the IO thread, now the code is answering those on the UI thread. The
    old code was constrained by the NPAPI plug-in system that forced synchronous IPCs
    from the renderer process to be handled not on the UI thread. Now we no longer
    have that constraint, and it is far simpler to just handle the IPCs directly on
    the UI thread. There is potential for some added delay to storage access if the
    browser's UI thread happens to be busy, but this should be a minor issue compared
    to the overall cost of accessing the storage systems.
2020-01-29 07:42:50 -05:00
mkarolin 5a801be3ab ContentSettingsType is now an enum class.
Changed all CONTENT_SETTINGS_TYPE_ to ContentSettingsType::

Chromium change:

https://chromium.googlesource.com/chromium/src/+/42f5e7d92c0265d4fab93addb5cec0f252df6265

commit 42f5e7d92c0265d4fab93addb5cec0f252df6265
Author: Darin Fisher <darin@chromium.org>
Date:   Wed Oct 30 07:15:45 2019 +0000

    Turn ContentSettingsType into an enum class type.

    This is a precursor to defining ContentSettingsType via mojom. That change
    will require more work as Clank depends on an Java definition of this type
    that is auto-generated from content_settings_types.h.
2020-01-29 07:42:49 -05:00
Max Karolinskiy 9beda45f23 Code Review Fixes. 2019-11-27 15:57:50 -05:00
Mark Pilgrim 3b527da6e4 permission service is now accessed through BrowserInterfaceBroker 2019-11-27 15:57:49 -05:00
Ivan Efremov ebbe28714a Clang-format. 2019-10-15 08:32:49 -07:00
Ivan Efremov b8bdf29787 Issue 6464: Cleanup content settings browsertest. 2019-10-15 08:32:49 -07:00
Ivan Efremov 671efa7de1 Issue 6464: Do not forget about shields while calculating cookie rules.
Fix https://github.com/brave/brave-browser/issues/6464
2019-10-15 08:32:49 -07:00
Brian Clifton 72a62c8a4e Fix browser test failures 2019-09-11 10:50:53 -07:00
Max Karolinskiy c5410484e7 Use base::Contains instead of ContainsKey.
ContainsKey/Value have been removed.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/73c901e63c6f2c1cfab306f4c4873bb30bfba651

commit 73c901e63c6f2c1cfab306f4c4873bb30bfba651
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Wed Jun 12 09:02:32 2019 +0000

    [base] Remove base::Contains{Key,Value}

    This change removes base::ContainsKey() and base::ContainsValue() from
    the codebase. In addition, it migrates remaining usages of these methods
    to using base::Contains instead. These usages were not caught by the
    search and replace CLs, because they either were added afterwards, or
    were unqualified and used ADL.

    TBR=rockot@google.com,blundell@chromium.org

    Bug: 970209
2019-09-05 21:22:13 -04:00
Jocelyn Liu acd80cb174 Update BraveContentSettingsObserverBrowserTest 2019-08-19 22:50:51 -07:00
Jocelyn Liu d3d279469a Add browser test for data URL case. 2019-08-19 21:36:52 -07:00
Cezar Augusto 50b8e6bfc2 allow Shields to block urls with invalid origins
fix https://github.com/brave/brave-browser/issues/5346
fix https://github.com/brave/brave-browser/issues/5483

shields can't manually block urls with invalid origins, making
blob:// and data:// scripts impossible to allow once, for example.
this channge ensures that Shields see such scripts the same way as
scripts with valid origins.
2019-08-19 21:36:52 -07:00
bridiver 28d03b7d03 use chromium cookie settings
related https://github.com/brave/brave-browser/issues/2351
2019-08-15 12:44:35 -07:00
yan 9a0c3e16d4 Add fingerprinting exception for Uphold
Fix https://github.com/brave/brave-browser/issues/4139
2019-06-25 16:58:58 -07:00
Brian Johnson 0c638ea81b fix missing dependencies (#2706)
fix https://github.com/brave/brave-browser/issues/4935
2019-06-16 14:49:06 -07:00
Simon Hong 5897901117 Re-enable webusb api 2019-06-06 10:39:19 +09:00
bridiver 15e07cd6b4 fix gn for ios builds
fix https://github.com/brave/brave-browser/issues/3080
2019-06-02 07:44:49 +01:00
Max Karolinskiy 2cc1974b72 Fix renamed header include. 2019-05-14 13:41:49 -07:00
Francois Marier 7760cff9a5 Merge pull request #2260 from brave/francois-3422-referrer-stripping2
Strip xorigin top-level navigation referrers instead of spoofing
2019-05-09 14:12:30 -05:00
bridiver e3917f6315 add support for building android-apk
required for https://github.com/brave/brave-browser/issues/2117
2019-05-08 12:35:11 -07:00
Francois Marier 737ba14c8c Fix lint errors 2019-04-26 15:42:38 -07:00
Francois Marier ea9ae21dce Strip xorigin top-level navigation referrers instead of spoofing
Fixes brave/brave-browser#3422.

This is based on the brave/brave-core#2070 pull request which
was committed in 501f4e0c78 and
then reverted in 056ce155f5 because
of brave/brave-browser#3988.
2019-04-26 15:28:54 -07:00
Brian R. Bondy 056ce155f5 Revert "Strip xorigin navigation referrers instead of spoofing" 2019-04-05 21:16:48 -04:00
Max Karolinskiy 8114d82b30 Revert "Merge pull request #2088 from brave/revert-c74-with-deps"
Reland C74 on master.

This reverts commit f6cfa13c73, reversing
changes made to 6143676339.
2019-04-01 17:46:01 -04:00