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
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
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
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
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.
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.
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