Commit Graph
117 Commits
Author SHA1 Message Date
mkarolin 2eff662c9a Native Notifications -> System Notifications.
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
2021-03-23 14:55:37 -04:00
samartnik 6ce70f3afc [Android] Removed unused items
Underlying chromium changes:
https://chromium.googlesource.com/chromium/src.git/+/80470f550fd433ddea4193f304b7a99f76018664

Componentize BackgroundTaskUpdateScheduler under component_updater

No change in logic, Just fleshing out BackgroundTaskUpdateScheduler out
of chrome and move it under components/component_updater/android so that
WebView can share the implementation with chrome.

Bug: 1170729

https://chromium.googlesource.com/chromium/src.git/+/d4e5432328169a4fc6d2854b7ce65698b325e4a4

weblayer/android: move kAndroidAppScheme

to components/embedder_support/android/common so that it can be
used by both android and weblayer.

BUG=none
TEST=none
2021-03-23 14:55:13 -04:00
bridiver 24c8d4ae99 code review fixes 2021-03-17 08:44:53 -07:00
bridiver 847319b09b fix DCHECK in stats updater tests 2021-03-16 15:28:22 -07:00
bridiver aed4510ccd fix spelling 2021-03-09 11:25:53 -07:00
bridiver 954b60c7d8 lint and gn check fixes 2021-03-09 10:30:51 -07:00
bridiver c4851fda9e ensure stats and referrals wait until the primary profile is initialized so ProfileManager::GetPrimaryUserProfile doesn't trigger early initialization of profiles 2021-03-09 10:18:23 -07:00
sergey a7f1d897e5 Set ipns and ifps as default handlers 2021-02-10 21:45:42 +03:00
Terry Mancey 89c25f1cb1 Disable custom ad notifications in release and beta builds 2021-01-11 16:30:24 +00:00
Simon Hong 55f0f0815b Use widevine component on linux
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.
2020-12-03 20:37:35 +09:00
Terry Mancey ef8f8da9c7 Implement custom Brave Ad notifications 2020-11-21 21:26:36 +00:00
Jocelyn Liu 3292a974e8 Add IPFSEnabled policy to control IPFS feature 2020-10-30 08:02:54 -07:00
mkarolin f4f71f0f47 Fixes header includes order. 2020-10-28 14:04:01 -04:00
samartnik fd3b4486e6 [Android] Platform check is added in browser_list.h and browser_list_observer.h
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
2020-10-28 14:03:59 -04:00
Anthony Tseng f7c65a925a Remove BraveTorClientUpdaterDelegate and avoid unused variable warning 2020-10-27 16:27:24 -07:00
Anthony Tseng 93b2f545d7 Move BraveTorClientUpdater 2020-10-27 16:27:23 -07:00
Anthony Tseng 1d74cf94c3 Move browser/tor & common/tor
except navigation_throttle and tab_helper
2020-10-27 16:27:23 -07:00
Anthony Tseng 08e8604cd4 Move buildflag 2020-10-27 16:27:22 -07:00
Brian R. Bondy c3a8f2947c Collapse components/ipfs/browser and components/ipfs/common into components/ipfs 2020-10-12 16:32:05 -04:00
Kevin Kuehler 705e805b76 Refactor stats_updater into browser/brave_stats 2020-10-08 14:49:47 -07:00
Simon Hong 5bd3df3298 Delete SR component data caching logic
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
2020-10-05 23:47:09 -07:00
Max Karolinskiy 05da95bf1a OS_MACOSX has been deprecated.
Switched to using OS_MAC or OS_APPLE.

Chromium change:

https://bugs.chromium.org/p/chromium/issues/detail?id=1105907
2020-09-11 14:45:32 -04:00
Brian R. Bondy 1cf530704b Buildflags and rebasing for IPFS support 2020-09-02 11:10:39 -04:00
drbh 34197b2800 base files for ipfs CRX mgmt 2020-09-02 11:10:39 -04:00
Anton Lazarev 9f6ba63559 move regional and custom adblock services into default service 2020-08-18 18:39:32 -04:00
AndriusA bf5a345895 loads SR content stylesheet from component updater
Refactors SpeedReader to separate component updater hooks from business logic.
Splits SpeedreaderWhitelist into SpeedreaderComponent (for component management) and SpeedreaderRewriterService for the rewriter.
2020-08-03 14:32:29 +01:00
Peter Snyder 7ba94d7c6f remove all use and references to the referrer exception service, fixes brave/brave-browser#10825 2020-07-22 08:09:05 -07:00
Terry ManceyandMoritz Haller 8379bd00b5 Implement out of band updates for Brave Ads
Implement out of band updates for purchase intent and page classification

Co-authored-by: Moritz Haller <mhaller@brave.com>
2020-07-10 10:25:47 +01:00
Mihai PLESA 2c8b5660d2 Merge pull request #5294 from brave/sync-v2
Sync v2
2020-06-12 00:02:09 +01:00
Anthony Tseng b5f41a36d5 SetNetworkTimeTracker might be called later than GetNetworkTime in some cases 2020-06-11 01:35:55 -07:00
Kevin Kuehler 884c2e8dd4 stats: Send API key with usage ping
Resolves https://github.com/brave/brave-browser/issues/9911
2020-06-10 10:09:17 -07:00
Anthony Tseng cfaa0f85b3 Introduce NetworkTimeHelper to fetch network time which is updated by
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
2020-06-08 23:12:23 -07:00
Simon Hong 8b376188d8 Use component for getting mapping table 2020-04-17 12:49:32 +09:00
Simon Hong 38ea624654 Refactoring NTPBackgroundImages module
Make NTPBackgroundImagesService register SI & SR simultaneously.
Make TopSite favicon from SR after campaign ends.
Fix broken test cases after this refactoring.
2020-04-17 12:49:31 +09:00
Simon Hong 809c136345 Implement NTP Custom homepage
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.
2020-04-17 12:49:30 +09:00
Simon Hong db168b5841 Rename ntp_sponsored_images module to ntp_background_images
fix https://github.com/brave/brave-browser/issues/8540
2020-03-24 15:13:24 +09:00
samartnik d414811ea4 [Android] Fixed build issues related to renaming in Chromium 2020-03-19 16:51:54 -04:00
mkarolin 691d86a335 Re-added a global on-demand component updater function.
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
2020-03-19 16:51:39 -04:00
mkarolin 8cbfc7eed8 components_ui.h has moved.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/4ba6c9a620c7705767544273e9639ad48faeceda

commit 4ba6c9a620c7705767544273e9639ad48faeceda
Author: Demetrios Papadopoulos <dpapad@chromium.org>
Date:   Sat Dec 7 03:26:01 2019 +0000

    Cleanup: Move chrome://components C++ classes to their own subfolder.

    Bug: None
2020-03-19 16:51:35 -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
Ivan Efremov 657e9a4899 Issue 7968: Wire up the easylist-based whitelist. 2020-03-10 23:17:52 +07:00
Simon Hong b6e8bdbd66 Make NTP SI component support android
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.
2020-03-05 07:28:05 +09:00
bridiver 278fb27261 refactor to remove brave/browser and chrome/browser dependencies outside of ViewCounterServiceFactory 2020-01-26 22:08:38 -08:00
Simon Hong bc8dda3be9 Rename NTPSponsoredImagesComponentManager
To NTPSponsoredImagesService because it doesn't manage component.
And fixed lint errors and added missing deps.
2020-01-25 21:00:23 -08:00
Simon Hong aeab4adf3e Use ComponentInstallerPolicy for registering NTP component 2020-01-25 21:00:23 -08:00
Pete Miller 96077586c1 New Tab Page: Move sponsored images component to correct browser subdirectory 2020-01-25 21:00:23 -08:00
Simon Hong 5b05c41c08 Support full region list for ntp sponsorship 2020-01-25 10:14:02 -08:00
Simon Hong 436f74f438 Rename NTPSponsoredImagesService to NTPSponsoredImagesComponentManager
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.
2020-01-24 10:10:41 -08:00
Simon Hong f4c8432384 Implement backend service for ntp sponsored images
NTPSponsoredImagesService registers proper components based on
locale and will notify to its observers whenever components is updated.

NTPSponsoredImageSource serves branded images.
2020-01-24 10:10:41 -08:00
samartnik b587658f88 Added missing header 2019-12-24 09:08:38 -05:00