Commit Graph
12 Commits
Author SHA1 Message Date
Claudio DeSouza 2987acef1e [CodeHealth] Clang tidy browser with use-equals-default V
This change corrects the constructors of several classes under
browser/, using clang-tidy's modernize-use-equals-default. Additionally,
this commit includes a few additional straggler files.
2022-08-17 15:48:08 +01:00
Mikhail 6387cfd7d4 Move a part of //brave/common to //brave/components (#13456)
* Move a part of //brave/common to //brave/components

* Fix lint issues

* Remove brave_features.*

* Fix android build

* Remove dead includes

* fix compilation

* Fix review issues

* Fix android gn check

* Revert patch changes

* Fix deps duplication & copyright

* Fix some DEPS/BUILD.gn contradictions

* gn format

* move sources.gni

* Fix nits

* Fix after rebase
2022-05-27 16:44:18 +07:00
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
Mario Sanchez Prada 5de37dafc8 Fix build due to missing include for network::ResourceRequest upstream
//chrome/browser/net/system_network_context_manager.cc is wrongly using
network::ResourceRequest without including it first, which is causing
a build failure on Brave due to overrides, so let's make sure that such
header is included before using that type.
2021-09-13 14:53:09 -04:00
Mario Sanchez Prada 10c9ed746e Move away from using base::{Bind,Callback,Closure}()
base::{Bind,Callback,Closure}() have been deprecatedfor a while now,
are finally gone on Chromium 92, so it would be good to migrate all
current instances in the code (and stop introducing new ones) to the
Once/Repeating variants instead to easy further rebases.

This patch changes ALL instances of those old definitions and move
to using the Once variants whenever possible (as they are preferred)
and Repeating variants in every other case.

Last, this patch also makes some changes in brave_rewards_api.{h,cc}
to use weak pointers instead of base::Unretained() when binding
callbacks, for extra safety (and consistency with existing code).

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2867526

Resolves https://github.com/brave/brave-browser/issues/15855
2021-05-20 16:27:04 +02:00
Mario Sanchez Prada 577eba4cdc Merge //brave/browser:browser_process into //chrome/browser
This is the very first step towards a clearer way to organize and
state dependencies between targets: for now we just remove this
target and fold everything into //chrome/browser via a massive
dump into browser/sources.gni with no further changes, plus the
necessary adaptations wherever the old target was referenced.

Once this is in place, next steps will extract different subsets
of the sources dumped in there into separate .gni files, so that
it can be more clearly stated which dependencies are actually
related to which subset of source files, instead of having the
giant merge of dependencies we had until now in a single target.

Once those separate .gni files are in place, and each of them
with their own clear set of dependencies, we should be in a much
better position to reorganize things and see what can be moved
around into independent GN targets instead of being part of the
//chrome/browser main target.

Finally, this change also makes the //brave/browser target a group
instead of a source_set and adjust visibility rules in a more
precise way, so that we can still reference //brave/browser from
different places in Brave (vs having to reference //chrome/browser).
2021-04-23 08:13:55 +02:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
mkarolin 36d98fde8b [GN] no more jumbo.
Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/878b18040e2d5a6d2c39f5a49be6f9dc04c35d03

commit 878b18040e2d5a6d2c39f5a49be6f9dc04c35d03
Author: Dirk Pranke <dpranke@google.com>
Date:   Fri Aug 7 20:53:38 2020 +0000

    Remove all remaining references to the jumbo build.

    This removes jumbo.gni, the imports of jumbo.gni, and
    any remaining stray references to it in the build files and docs.

    Bug: 994387
2020-09-11 14:45:31 -04:00
mkarolin 255b51bc0e Renamed build output in brave/network/public/cpp.
Due to a collision with another target:

ERROR at //build/config/BUILDCONFIG.gn:570:5: Duplicate output file.
    target(_target_type, _target_name) {
    ^-----------------------------------
Two or more targets generate the same output:
  cpp.dll

This is can often be fixed by changing one of the target names, or by
setting an output_name on one of them.

Collisions:
  //brave/services/network/public/cpp:cpp
  //media/learning/mojo/public/cpp:cpp

Chromium change:

https://chromium.googlesource.com/chromium/src/+/96665a836d2b2ffab4951167fbf3230dbe3aec30

commit 96665a836d2b2ffab4951167fbf3230dbe3aec30
Author: liberato@chromium.org <liberato@chromium.org>
Date:   Thu Jan 23 00:35:37 2020 +0000

    Attach SmoothnessHelper to WMPI for MediaCap experiment

    This CL also plumbs ukm::SourceId through BeginObservation, instead
    of CompleteObservation so that default target values work.
2020-03-19 16:51:30 -04:00
samartnik 0bd0aa0a22 Fixed debug build for Windows 2020-01-04 07:57:56 -05:00
samartnik 674353cb1c Added deps. Minor review fixes. 2019-12-24 08:07:08 -05:00
samartnik e4f3242c79 Fixed Android mono builds 2019-12-24 08:07:08 -05:00