Chromium change:
https://chromium.googlesource.com/chromium/src/+/c30c9ddff5c96efd8e2455d7435e49806526c155
commit c30c9ddff5c96efd8e2455d7435e49806526c155
Author: Peter Beverloo <peter@chromium.org>
Date: Wed Feb 24 19:56:03 2021 +0000
Introduce "system notifications" terminology to mirror the native ones
This is the first step in migrating from "native notifications" to
"system notifications", following the spirit of inclusive code. A
very brief migration plan has been included in the linked issue.
Concretely, this CL:
* Introduces the SystemNotifications base::Feature, matching the
NativeNotifications one. Both will be supported for one milestone.
* Introduces the AllowSystemNotifications enterprise policy, matching
the AllowNativeNotifications one. Both will be supported for about
a year, enabling enterprises to migrate.
* Updates the chrome://flags entry to say "system notifications" and
set the new base::Feature flag.
* Renames the build-time flag, as deprecation concerns are pretty much
absent there.
Bug: 1136840
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/4737f9a9625b17bbe7b8d3387823c8eef84f6d2b
commit 4737f9a9625b17bbe7b8d3387823c8eef84f6d2b
Author: Richard Knoll <knollr@chromium.org>
Date: Thu Jan 21 12:52:59 2021 +0000
Remove NotificationCenter from AlertDispatcher
This refactors the macOS AlertDispatcher interface to no longer require
an instance of NSUserNotificationCenter to be passed in. We expect the
caller to query their local NotificationCenter instead and merge the
results. This allows us to use the same interface in a future CL for the
UNNotification API.
Bug: 1127306
https://source.chromium.org/chromium/chromium/src/+/b8acb518aba0a01f6a14dfc6d32715671f3d8cdd
commit b8acb518aba0a01f6a14dfc6d32715671f3d8cdd
Author: Richard Knoll <knollr@chromium.org>
Date: Mon Jan 25 12:07:21 2021 +0000
Reland "Pass incognito flag when closing macOS alerts"
This is a reland of e48554ec4a6e3c50fb63717edb0a0d244a98616c
The original change revealed that the currently used API has the same
issue when identifying notifications from multiple profiles. It only
used the notification id as identifier which might clash with another
Chrome profile. This is now fixed by using the same unique identifier
we use for the new API.
PS1 contains the original change
PS2 has the fix for the currently used API
Original change's description:
> Pass incognito flag when closing macOS alerts
>
> A macOS notification is identified with the tuple
> {notificationId, profileId, incognito} and we have to pass these down to
> the XPC service to close the correct notification. The same applies to
> the notification id used in the UNNotification API where we need to
> include the incognito flag in the id. Also updates some method names to
> be more consistent.
>
> Bug: None
> Change-Id: Ie45cb74eab182e0b495560110d8e6e32367c4bc7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2642275
> Reviewed-by: Rayan Kanso <rayankans@chromium.org>
> Commit-Queue: Richard Knoll <knollr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#846183}
Bug: None
https://source.chromium.org/chromium/chromium/src/+/dd062faf6b1bf61d0410b1e0ab52afb42215b1b2
commit dd062faf6b1bf61d0410b1e0ab52afb42215b1b2
Author: Richard Knoll <knollr@chromium.org>
Date: Tue Feb 2 13:03:55 2021 +0000
Get all alerts shown via XPC on macOS
This adds a new method to the XPC service that allows us to get all
currently displayed alert notifications regardless of which profile they
belong to. This will be required in the new bridge as the UNNotification
API has no reliable way of detecting when a notification has been
dismissed. Instead we will periodically synchronize with the system to
detect closed notifications like we do on Windows 10.
Bug: 1134570
https://source.chromium.org/chromium/chromium/src/+/efcf97ea2b47844b017fe95d4cb349eaf97d6d9c
commit efcf97ea2b47844b017fe95d4cb349eaf97d6d9c
Author: Richard Knoll <knollr@chromium.org>
Date: Fri Feb 26 00:35:32 2021 +0000
Close macOS notifications on profile shutdown
We need to close notifications earlier in the shutdown process as it's
too late to do so in the destructor. Closing them in the profile
shutdown method also makes sense as we don't want notifications for
incognito or guest profiles to stay around.
Bug: 1170731
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/20a41c8b03a9ab035619e225520dfec484fb3e69
commit 20a41c8b03a9ab035619e225520dfec484fb3e69
Author: Glen Robertson <glenrob@chromium.org>
Date: Tue Jan 19 08:20:35 2021 +0000
Separate profile.{cc,h} (& observer) to its own GN target.
This allows other code to depend on profile.h (very common as it is a
keyed service key) without depending on all of //c/b:browser. This
improves modularization of the codebase and will help to break
dependency cycles in GN.
Bug: 1149277
A new static assertion has been added upstream and otherwise the
build will fail for Linux now, as well as for other platforms in
the next release.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ad0da8ebec488b6b3696b44d2da80744f8a90d17https://source.chromium.org/chromium/chromium/src/+/63714a9ffe267a0212f4120a188f45408555a993
commit ad0da8ebec488b6b3696b44d2da80744f8a90d17
Author: Daniel Cheng <dcheng@chromium.org>
Date: Mon Feb 22 21:07:22 2021 +0000
Disallow base::Passed() from being used with base::BindOnce().
The assert is currently only enabled on OS_LINUX. Platforms will be
incrementally fixed until the assert is enabled everywhere.
Bug: 1180750
commit 63714a9ffe267a0212f4120a188f45408555a993
Author: Daniel Cheng <dcheng@chromium.org>
Date: Fri Feb 26 09:51:28 2021
[base] Disallow base::BindOnce() + base::Passed() use on iOS.
std::move() and base::Passed() mean the same thing for base::BindOnce(),
so use the standard library idiom instead.
Bug: 1180750
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/db01f8a5783095aee1de20925fb8cc4d67f6c485
commit db01f8a5783095aee1de20925fb8cc4d67f6c485
Author: Anthony Cui <cuianthony@google.com>
Date: Thu Feb 18 21:45:18 2021 +0000
Refactor unknown source language option and add support to Android
This change
- Refactors the implementation of the Unknown source language option,
adding it at the TranslateUIDelegate level and treating it like other
language options
- Renames the "Unknown" option to "Detected Language" for a more
functional description
- Adds support for use of the new "Detected Language" source language
option on Android
- Adds both the string change and the Android support changes behind a
new feature flag
Bug: 1127094
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1b46c0a5122001153c56824f024a68ba56e5d1f9
commit 1b46c0a5122001153c56824f024a68ba56e5d1f9
Author: Keishi Hattori <keishi@chromium.org>
Date: Mon Feb 22 22:02:34 2021 +0000
Fix BrowserNavigatorTest.SwitchToTabIncognitoLeak for BackupRefPtr
BrowserNavigatorTest.SwitchToTabIncognitoLeak fails when BackupRefPtr is used because it reads NavigateParams:: rowser after it has been moved.
Unlike raw pointer, BackupRefPtr will be cleared when moved.
This CL changes ShowSingletonTabOverwritingNTP() to take a pointer so Navigate() doesn't have to move NavigateP rams.
Adapt Brave-specific code and overrides to use this equivalent struct.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/a696151783d69bc6e8884246418d771d06cd9f53
commit a696151783d69bc6e8884246418d771d06cd9f53
Author: dpapad <dpapad@chromium.org>
Date: Tue Feb 16 12:34:08 2021 +0000
WebuI: Delete GritResourceMap struct in favor of webui::ResourcePath.
- Move webui::ResourcePath definition to its own file in
ui/base/webui/.
- Modify Grit to use webui::ResourcePath, and delete the identical
GritResourceMap struct.
- Remove the AddResourcePathsBulk() override that used GritResourceMap.
This is in preparation of moving AddResourcePathsBulk to WebUIDataSource
itself.
Bug: 1176299
This method has been removed from upstream as it was not used and there
does not seem to be an equivalent one available, so let's bring it back.
Fixup! Mario says: on a second thought I think this is probably not
needed so reverting this change (and simply dropping the
CloseGuestProfileWindows() call from
BraveProfileMenuView::OnExitProfileButtonClicked().
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/53d0699ee2609b7195a93d92d2433500a0affd55
commit 53d0699ee2609b7195a93d92d2433500a0affd55
Author: Monica Basta <msalama@chromium.org>
Date: Wed Feb 10 11:57:07 2021 +0000
[Profiles]: Avoid opening the profile picker on close 'x' windows
Currently on click on 'Close x windows' from the profile menu, the
profile is closed and the user manager/profile picker is opened. This
behavior is no longer desired. Clicking on the button should only close
the profile. This CL also removes 'CloseGuestProfileWindows' function
that is not used.
Bug: 1176599