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 started to support widevine cdm component since c79.
Before that, only bundling was supported.
So, we've been using our widevine manager for downloading/managing
widevine during the runtime.
With enabling widevine cdm component, all our codes are deleted.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/06abf006f7c6616f2b301f07dc1254639c699ecd
Add platform check in browser_list.h and browser_list_observer.h
These files are included in Android builds, but they shouldn't
be. This adds checks and fixes the include errors.
These checks are a step toward enabling gn check in chrome/browser.
Bug: 949535
As we decided not show SR top sites in NTP after SR is terminated,
we don't need to cache it.
Delete getDefaultSuperReferralTopSites api and related code
Refactors SpeedReader to separate component updater hooks from business logic.
Splits SpeedreaderWhitelist into SpeedreaderComponent (for component management) and SpeedreaderRewriterService for the rewriter.
every sync server response. If network time is unavailable, local time
will be used and network time will get updated no matter the access token is
accpeted by server or not. So we no longer need extra access fetcher
to get timestamp from server.
Brave sync now won't set primary account in IdentityManager which
interferes with `chrome.identity` extension API
Make NTPBackgroundImagesService register SI & SR simultaneously.
Make TopSite favicon from SR after campaign ends.
Fix broken test cases after this refactoring.
NTPBackgroundImagesService will control which background provider(SI or SR)
should be used for NTP background.
It's global service because SI or SR component is browser-wide component.
And ViewCounterService will handle profile-wide properties.
In this PR, kNewTabPageShowSuperReferrerBackgroundImage pref is added.
Client should use it as a switch for turn it on/off SR component in runtime.
Regarding to flags, existing New Tab Page Branded Wallpapers flag will act
as a top level switch. If it is off, SI and SR are all disabled.
If New Tab Page Branded Wallpapers feature switch is on, SI component is
enabled by default.
New "Enable Brave Custom Homepage" flag is introduced for SR component.
If this is on, SR component will be installed when current install comes
from super referrer. If not, SI component will be registered.
If SI flag and demo flag are on, super referrer demo data will be provided.
If SI flag is off and demo flags is on, sponsored images data will be provided.
Regarding to ntp-branded-data-path, this switch can be used for both.
This functionality used to be exposed via a static
ComponentsUI::OnDemandUpdate, which has now been hidden in a private
member of ComponentsHandler.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/eec18700d123fc1564a3d00c33eadae594910fb4
commit eec18700d123fc1564a3d00c33eadae594910fb4
Author: Demetrios Papadopoulos <dpapad@chromium.org>
Date: Fri Dec 6 21:54:39 2019 +0000
Eliminate calls to CallJavascriptFunctionUnsafe in chrome://components.
- Moving ComponentsDomHandler to its own .h/cc files,
and renaming to ComponentsHandler.
- Moving some logic from ComponentsUI to ComponentsHandler so that proper
lifetime methods (OnJavascriptAllowed/Disallowed) can be leveraged.
This is in preparation of migrating this page to JS modules.
Bug: 1028829
For supporting android, NTP SI data should also have focal point.
So far, focal point data was ignored because desktop doesn't need it.
Also did some refactoring and cleanup.
Renamed because NTPSponsoredImagesService manages component registration
and component update. and Service is normaly used by KeyedService.
Also, Client should do some jobs per profile. It's adding and updating
URLDataSources per profile whenever component is updated.
NTPSponsoredImagesService(BrowserContextKeyedService) will be added
for that job.
NTPSponsoredImagesService registers proper components based on
locale and will notify to its observers whenever components is updated.
NTPSponsoredImageSource serves branded images.