Commit Graph
20 Commits
Author SHA1 Message Date
Mario Sanchez Prada bbf5fd3fe9 Remove deprecated DISALLOW_ macros from Brave-specific code
Macros such as DISALLOW_COPY_AND_ASSIGN() are deprecated since r711900
per style arbitration [1]. This commit replaces the macros with deleted
constructors and methods, which is preferred by the Google C++ Style
Guide [2][3].

Also remove unneeded "base/macros.h" #includes when possible.

This CL is created semi-mechanically with remove_disallow and
remove_base_macros [4].

[1]: https://groups.google.com/a/chromium.org/g/cxx/c/qwH2hxaEjac/m/TUKq6eqfCwAJ
[2]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#explicitly-declare-class-copyability_movability
[3]: https://google.github.io/styleguide/cppguide.html#Copyable_Movable_Types
[4]: https://pkg.go.dev/go.timothygu.me/tools/cr/cmd

Chromium change:

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

commit d002a3bee7ae75780b604d17df19291a3dd303fb
Author: Peter Boström <pbos@chromium.org>
Date:   Fri Nov 5 17:17:19 2021 +0000

    Remove DISALLOW_ macros from base/macros.h

    This removes DISALLOW_COPY(), DISALLOW_ASSIGN() and
    DISALLOW_COPY_AND_ASSIGN() from base/macros.h. PRESUBMITs are also
    updated to no longer check for these macros.

    IWYU removal is left as a separate change just in case this needs to be
    reverted.

    Bug: 1010217
2022-01-24 15:33:37 -05:00
mkarolin 50f7d5587b Task-related files moved from base/ to base/task/
Chromium change:

https://chromium.googlesource.com/chromium/src/+/39810e70da06baca176c0cdbc93164be1f980f59

commit 39810e70da06baca176c0cdbc93164be1f980f59
Author: Patrick Monette <pmonette@chromium.org>
Date:   Thu Oct 14 18:06:59 2021 +0000

    Reland "Move task-related files from base/ to base/task/"

    This is a reland of 092c30c5fd4def5a0c63d6f3a8953bd07768dd44

    The 2 problematic subrepos have been migrated and a couple late
    addition of the old headers were migrated.

    Original change's description:
    > Move task-related files from base/ to base/task/
    >
    > The forward headers are updated to point to the new location, and the
    > header guards were fixed.
    >
    > Bug: 1255932
2021-12-07 14:45:00 -05:00
mkarolin bbda8634b8 WebUI: remove @out_folder@ stripping.
It is no longer needed: when necessary resource_path can be used in the
grd.

Chromium change:

https://bugs.chromium.org/p/chromium/issues/detail?id=1171239

https://source.chromium.org/chromium/chromium/src/+/48b1ba996d2e019abad844fc47a5a1710b9da737

commit 48b1ba996d2e019abad844fc47a5a1710b9da737
Author: dpapad <dpapad@chromium.org>
Date:   Mon Feb 8 21:10:42 2021 +0000

    WebUI: Remove aliasing mechanism in SharedResourcesDataSource

    The last few entries in the alias map were either
     1) Unnecessary because the URLs were no longer used
        (views/resources/ case)
     2) Unnecessary because they could be replaced with |resource_path|
        (lottie case)
2021-03-23 14:55:27 -04:00
Mario Sanchez Prada 61a4a23f48 Migrate away from GritResourceMap and into webui::ResourcePath
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
2021-03-23 14:55:24 -04:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
Pete Miller e90fa9feb2 NTP WebUI: take global fonts and css out of JS bundle
Already served from chrome://brave-resource/... which will benefit from async parsing and cross-page caching
2020-07-07 15:41:59 -07:00
mkarolin 764e2c8543 WebUI code moved to run on the UI thread.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/76ad70a295931ca8b0ff3613bd266b8fb34bc177

commit 76ad70a295931ca8b0ff3613bd266b8fb34bc177
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Mon May 18 16:08:12 2020 +0000

    Reland "Move WebUI code to run on the UI thread."

    This reverts commit 8f6d95238903920fbc13d3bc805f095a0a4c8df2.

    Per analysis of all the waterfall bots that run this chrome_all_tast_tests, this doesn't affect the flakiness. Details in
    https://bugs.chromium.org/p/chromium/issues/detail?id=1082326#c51

    Original change's description:
    > Revert moving WebUI code to run on the UI thread as there are still PFQ flakes.
    >
    > Revert "Reland "Move WebUI code to run on the UI thread only.""
    >
    > This reverts commit 52fd322ec1451094dfd5b2a82cabbc47e3839e30.
    >
    > Revert "Reland "Remove InstantIOContext since it's not needed anymore.""
    >
    > This reverts commit 6360b9fdb0023228011e4e872ea2831760dd03c5.
    >
    > Revert "Add extra thread hops in WebUI code on ChromeOS to simulate old timing."
    >
    > This reverts commit dbb65740f2e7d349218ed3be4838a5a9c7ce2986.
    >
    > Bug: 1082326, 1062873
2020-07-01 18:12:02 -04:00
mkarolin 663f2fd034 Hookup Brave polymer v3 resources to the build.
Adds v3 GRDP with .m.js files.
Adds resources build dependency on modulize target.
Adds data source prefix alias to strip generated path.
2020-01-29 07:43:56 -05:00
mkarolin 8e40d033f1 UrlDataSource::IsGzipped has been removed.
Chromium change:

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

commit edfdcea2942f8569b535a9b85ed48dfa31942193
Author: Joel Hockey <joelhockey@chromium.org>
Date:   Thu Nov 7 21:54:44 2019 +0000

    Remove UrlDataSource::IsGzipped since it is not used

    Added in https://codereview.chromium.org/2149323003, but
    currently has no callers.
2020-01-29 07:42:50 -05:00
mkarolin 79b57daef7 URLDataSource::StartDataRequest signature changes.
Chromium changes:

https://chromium.googlesource.com/chromium/src/+/39f4ff30f2078b6e7301fdbbfc2c23b84fa0538d

commit 39f4ff30f2078b6e7301fdbbfc2c23b84fa0538d
Author: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Date:   Tue Oct 22 17:59:09 2019 +0000

    Pass GURL to URLDataSource::StartDataRequest()

    Bug: 991888

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

commit f4b9e94bcc00bace773ea74d0801ba9a32beab8c
Author: danakj <danakj@chromium.org>
Date:   Fri Nov 29 15:43:04 2019 +0000

    Convert Callback to {Once,Repeating}Callback in //content/browser.

    Use OnceCallback where possible, and use BindRepeating() where it is
    meant to be a RepeatingCallback.

    Majority of this change is a few typedefs that are very widely used:
    - LoadedCallback
    - ValidateTokenCallback
    - ValidateRegistrationCallback
    - GotDataCallback**

    ** Especially this one.

    Bug: 1007760
2020-01-29 07:42:50 -05:00
mkarolin e5adca5d21 Move ResourceRequestInfo::WebContentsGetter to WebContents::Getter
Chromium change:

https://chromium.googlesource.com/chromium/src/+/92bf36029638ae236920177e722650bed2a40e84

commit 92bf36029638ae236920177e722650bed2a40e84
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Wed Jul 31 02:25:48 2019 +0000

    Move ResourceRequestInfo::WebContentsGetter to WebContents::Getter.

    This is in preparation of removing ResourceRequestInfo which isn't needed anymore.

    Bug: 934009
2019-10-09 21:50:27 -04:00
Max Karolinskiy 7d38f211bc Lint fixes. 2019-09-06 13:25:38 -04:00
Max Karolinskiy fde8fc5d9f content/public interfaces are no longer const.
Removed const from overrides.

Chromium change:

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

commit 4b4eed074e848347f5a5b07d4d4b3fd2f6e13820
Author: Lucas Furukawa Gadani <lfg@chromium.org>
Date:   Tue Jun 4 23:12:04 2019 +0000

    Remove const interfaces from content/public.

    Tbr: boliu@chromium.org, dvadym@chromium.org, bengr@chromium.org
    Bug: 908139
2019-09-05 21:22:08 -04:00
Max Karolinskiy 7538d3c77d Lint fixes. 2019-07-10 16:38:33 -04:00
Max Karolinskiy 2cdbab6380 Minor cosmetic cleanup of brave_shared_resources_data_source.cc 2019-07-10 16:38:32 -04:00
Max Karolinskiy 442645426a No longer need gzipped resource map.
Chromium changes:

commit 516800beffb1c5dbe305cbd5291c1f2e5243c5a3
Author: dpapad <dpapad@chromium.org>
Date:   Mon May 6 22:38:48 2019 +0000

    Leverage DataPack::IsGzipped() from SharedResourcesDataSource.

    The data sources that serve chrome://resources URLs were previously
    relying on Grit's gzipped_resource_map_source output format. This is
    no longer necessary since DataPack::IsGzipped() is exposed via the
    content client API (or web client API on iOS).

    Also reverting various grd files to use a normal resource_map_source
    Grit output instead. The goal is to eventually
    remove gzipped_resource_map_source output completely, since it should not be
    necessary anymore (but there is more work needed to get there).

    Bug: 738243

commit bca1b9759444b4717c63bd2f02f10997a45530aa
Author: dpapad <dpapad@chromium.org>
Date:   Tue May 14 18:51:02 2019 +0000

    Grit: Remove gzipped_resource_* output formats.

    No longer used anywhere and not needed.

    Bug: 961063
2019-07-10 16:38:31 -04:00
Simon Hong 7fea7a5016 Delete modifying navigator.plugins and mimeTypes
So far, brave only exposes flash when it is available.
Brave will use pdfium as a pdf viewer instead of pdf.js.
That causes plugins and mimeTypes will include pdf things.
That means we expose all that brave have.
So, we don't need to blacklist except flash plugins.
2019-05-30 14:26:05 -07:00
petemill fe624a333f Serve common webui resources from chrome://brave-resources
Adds a new UrlDataSource: BraveSharedResourcesDataSource whose purpose is to:
- Serve shared fonts and css for use in brave and chromium webui
- Host modules for chromium polymer-based webui

Enable client-side caching for chrome://brave-resources since nothing from this domain is profile-specific at the moment
2019-02-21 13:05:31 -08:00
Simon Hong c0fa516e42 Fix build/link error comes from brave_plugin_registry_impl.o
To fix compile/link error, adding brave sources directly to content/browser source list is
most simple and cleaner way. If not, we need more number of patches
and can meet content/public/common dependency cycle.
2018-11-24 00:58:57 +09:00
Pranjal d039e8f1a2 Issue 1549: Return constant results for navigator.plugins and navigator.mimeTypes
auditors: @diracdeltas, @bridiver
2018-11-21 10:21:18 -08:00