Commit Graph
147 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
AlexeyBarabash f3f4f08ebf Android checks sync QR codes v2 - implementation 2021-11-26 16:42:16 +02:00
AlexeyBarabash f955a3061b Android checks sync QR codes v2 - initial phase 2021-11-26 14:52:05 +02:00
AlexeyBarabash d7d0524397 Android shows sync QR code v2 2021-11-26 14:52:05 +02:00
Alex C df2f0906ae [Android] Brave news on NTP, integration with mojom and feature flag 2021-11-24 14:23:24 -08:00
AlexeyBarabash 7ab466de20 Strictly ensure sync code is valid at BraveSyncWorker::GetSyncCodeWords 2021-11-10 19:57:15 +02:00
Mario Sanchez Prada 8f3899e8da Add missing colon after uses of WEB_CONTENTS_USER_DATA_KEY_IMPL
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/383df85481f84629bac8d7f45713012b88aceaa6

commit 383df85481f84629bac8d7f45713012b88aceaa6
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Sat Oct 2 03:28:01 2021 +0000

    Make helper macros behave consistently for //content/public UserData types

    X_USER_DATA_KEY_DECL() requires a semicolon while X_USER_DATA_KEY_IMPL()
    does not. This CL changes it so they both consistently require a
    semicolon.

    The comments have also been updated to:
    - reflect the updated macro usage to consistently require semicolons
    - simply the friend declaration, which does not need to qualify the
      base class template with the `content::` namespace nor explicitly
      specify the base class template's type parameter.

    Macro cleanups outside //content/public/browser were generated using the
    following commands:

    sed -z -i 's|\nNAVIGATION_HANDLE_USER_DATA_KEY_IMPL([ \n]*\([^)]\+\))|\nNAVIGATION_HANDLE_USER_DATA_KEY_IMPL(\1);|g' $(git gs NAVIGATION_HANDLE_USER_DATA_KEY_IMPL --name-only | grep -v navigation_handle_user_data.h)
    sed -z -i 's|\nPAGE_USER_DATA_KEY_IMPL([ \n]*\([^)]\+\))|\nPAGE_USER_DATA_KEY_IMPL(\1);|g' $(git gs PAGE_USER_DATA_KEY_IMPL --name-only | grep -v page_user_data.h)
    sed -z -i 's|\nRENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL([ \n]*\([^)]\+\))|\nRENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL(\1);|g' $(git gs RENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL --name-only | grep -v render_document_host_user_data.h)
    sed -z -i 's|\nWEB_CONTENTS_USER_DATA_KEY_IMPL([ \n]*\([^)]\+\))|\nWEB_CONTENTS_USER_DATA_KEY_IMPL(\1);|g' $(git gs WEB_CONTENTS_USER_DATA_KEY_IMPL --name-only | grep -v web_contents_user_data.h)

    Bug: 1254987
2021-11-02 12:38:04 -04:00
bridiver afa867a540 remove enable_brave_perf_predictor buidlflag 2021-08-18 16:50:48 -07:00
mkarolin 8ac1f664cf Adapt to relocation of components/sync/driver/profile_sync_service.* II.
Followup to a prior commit that follows upstream and renames
ProfileSyncService to SyncServiceImpl in various class names.
2021-08-18 11:00:03 -04:00
Mario Sanchez Prada 600b872461 Adapt patch for chrome/browser/sync/profile_sync_service_factory.cc
It's chrome/browser/sync/sync_service_factory.cc now.

Chromium change:

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

commit ff4e5f6e2d335450d95d29be8496d2f65471a3d2
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Tue Jun 1 20:12:14 2021 +0000

    Rename chrome/'s ProfileSyncServiceFactory to SyncServiceFactory

    The goal of this factory is to return a SyncService. This follows
    the naming convention of other keyed services that have an abstract
    interface.

    Bug: 1201272
2021-08-18 10:39:55 -04:00
Anthony Tseng 8c47e4e293 lint fix 2021-08-17 16:44:47 -07:00
Anthony Tseng 618ac477ab Move brave_sync_devices_android.* to brave_chrome_browser_sources 2021-08-17 16:14:31 -07:00
Anthony Tseng bee6c98a61 Remove enable_brave_sync buildflag 2021-08-17 16:13:57 -07:00
Terry Mancey a327261a53 Remove Brave Ads build flags 2021-08-17 11:42:17 -05:00
sergey 0b3ff3fcf7 Rename ipfs_enabled -> enable_ipfs
ipfs_local_node_enabled -> enable_ipfs_local_node
2021-08-09 19:21:13 +03:00
samartnik c3d4d0020f [Android] Added toggle for Brave stats 2021-08-05 11:56:30 -04:00
samartnik e58b585ef7 [Android] Fixes for cosmetic filtering and ads blocking modes 2021-07-21 12:30:33 -04:00
Brian R. Bondy d9d0401c82 Merge pull request #8545 from brave/cr92
Upgrade from Chromium 91 to Chromium 92
2021-06-29 23:02:38 -04:00
samartnik 7132ee47f8 [Android] UTF8ToUTF16 banned on compile-time string constants
Chromium change:
https://chromium.googlesource.com/chromium/src/+/9ca8a38a28e547d0c47630e3e56a69d06c7ab68b

Ban UTF8ToUTF16 on compile-time string constants.

Bug: 1189439
2021-06-29 16:35:46 -04:00
samartnik d4bf86fe64 [Android] Renamed IsEncryptEverythingAllowed and IsUsingSecondaryPassphrase
Chromium changes:

https://chromium.googlesource.com/chromium/src/+/930e2af1d16616915d2190503be1ccee143e1b53

[sync] Rename term 'secondary' with 'explicit' wrt passphrase

No behavioral changes, it's a fully automated replacement of the term.

The new name is consistent with other code like
syncer::IsExplicitPassphrase(). This logic returns true mainly for
custom passphrase users but also for the legacy
frozen-implicit-passphrase users (very similar to custom passphrase).

Change-Id: Id7ccbfaeef8fa995ca669e6040ef276bd18c0d3b
Bug: 1016715

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

[sync] Rename IsEncryptEverythingAllowed to IsCustomPassphraseAllowed

No behavior is changed. This better reflects the meaning of this
method.

Bug: None
2021-06-29 16:35:10 -04:00
Alex C 813ed681f1 [Android] refactored shields blockers 2021-06-25 11:30:17 -04:00
Alex C 54e4665be7 [Android] adds block trackers (with aggressive mode) to shields 2021-06-24 14:49:51 -04:00
Alex C 60073add10 [Android] update ad blocker for update (keep option from previous release) 2021-06-18 19:14:57 -04:00
wchen342 ad29a464a1 Merge pull request #8962 from brave/android_test
Add initial Android browser test
2021-06-18 14:22:05 +00:00
wchen342 53367b3280 Add experimental Android browser test
Add some brave tests

Format files
2021-06-16 18:21:54 +03:00
Mario Sanchez Prada 46ba4a605f Adapt to deprecation of base::ScopedObserver
base::ScopedObserver is being deprecated on Chromium 93, so we need
to migrate to either ScopedObservation or ScopedMultiSourceObservation
depending on whether one or multiple sources are being observed.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/3a35c513e236f28ba817b6667c9c973163241ebd

commit 3a35c513e236f28ba817b6667c9c973163241ebd
Author: Sigurdur Asgeirsson <siggi@chromium.org>
Date:   Thu Jun 3 16:34:54 2021 +0000

    Remove redundant base/scoped_observer.h includes.

    ScopedObserver is being deprecated in favor of two new classes:
    - base::ScopedObservation for observers that only ever observe
      a single source.
    - base::ScopedMultiSourceObservation for observers that do or may
      observe more than a single source.

    Bug: 1145565

Resolves https://github.com/brave/brave-browser/issues/16371
2021-06-14 11:40:40 +02:00
Alex C bff402e7f8 [Android] fixes inconsistencies in settings 2021-06-10 12:47:33 -04:00
Alex C 72a68ef79d [Android] fixes remember settings values, clear data on exit items, conflict with shields 2021-06-07 18:08:04 -04:00
Mario Sanchez Prada 934aa92acf Merge //brave/browser/brave_stas:stats_updater into //chrome/browser
The files of this target have a strong dependency on //chrome/browser,
so let's move them up into that //chrome/browser target itself.

Resolves https://github.com/brave/brave-browser/issues/16169
2021-06-02 16:01:33 +02:00
Alex C adba900a82 [Android] PR changes and lint 2021-05-19 11:19:47 -04:00
Alex C 5f7d79d461 [Android] reorganizes Settings and Privacy settings, sets shields global prefs 2021-05-14 19:26:30 -04:00
bridiver 3fd7c07d42 fix brave/components/brave_shields deps
fixes https://github.com/brave/brave-browser/issues/10643
2021-05-11 11:59:42 -07:00
bridiver 96e24bc4bb code review fixes 2021-04-27 10:23:52 -07:00
Anton Lazarev d5d13c05c2 create separate interface for BraveBrowserProcess 2021-04-23 13:08:15 -07:00
samartnik 5515dfb25e [Android] Dynamically detect disable option for Tab Groups 2021-04-23 10:08:43 -04:00
samartnik 705a308c0f [Android] Added option for Tab Groups 2021-04-20 15:44:28 -04:00
samartnik db0ac44414 [Android] Fixed lint 2021-04-19 21:13:00 -04:00
samartnik b80575b6ee [Android] Added WebRTC IP handling policy option 2021-04-19 16:49:07 -04:00
Jocelyn Liu 647f954149 Enable support of Unstoppable Domains and ENS via DoH on Android 2021-04-15 22:08:03 -07:00
samartnik 29d15dec3b [Android] Explicitly specified headers for GURL
Needed to avoid build errors like

../../brave/browser/android/preferences/brave_pref_service_bridge.cc:56:7: error: invalid use of incomplete type 'GURL'
2021-03-23 14:55:03 -04:00
Brian R. Bondy b31185e875 Revert "Merge pull request #8299 from brave/revert_8257"
This reverts commit 96aebb9ee6, reversing
changes made to 7e073b26c1.
2021-03-18 20:26:48 -04:00
Jocelyn Liu 25a3c5c48d Revert "Merge pull request #8257 from brave/ipfs-android"
This reverts commit 534a1e122d, reversing
changes made to 103be2b8c1.
2021-03-18 14:02:59 -07:00
Brian R. Bondy 7f0bc31b89 Add IPFS gateway support on Android 2021-03-17 13:09:14 -04:00
wchen342 0724ac82dc Fix deprecated jni calls 2021-03-12 13:58:52 +02:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
AlexeyBarabash 19e1453e23 Fixed sync service pointers 2021-02-04 23:52:56 -05:00
AlexeyBarabash 78274f5674 Redone set sync encryption for Android to match Chromium 89
Related Chromium change https://source.chromium.org/chromium/chromium/src/+/b455227428979e24f66de2f45c9180f33f4a8adf

fixes brave-browser#13754
2021-02-04 23:52:48 -05:00
samartnik dfc5f9e04a [Android] Sync ProfileMetrics were changed
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b455227428979e24f66de2f45c9180f33f4a8adf

[sync] Rewrite setSyncEncryption() chrome://settings JS API

This API was called when the user created a new sync encryption passphrase
or entered an existing one. This CL improves both its semantics and
implementation.
- Instead of having a set_new_passphrase flag to distinguish new/existing
passphrases, the API is split in set[Encryption/Decryption]Passphrase().
The implementations are mostly disjoint and there's a clear separation
now (the old code would even ignore set_new_passphrase sometimes). This
also mimics the signatures from other layers.
- As per the linked bug, the APIs now receive only what's necessary (the
passphrase string) instead of an entire SyncPrefs object.
- Following a suggestion from an old TODO [1], the "return values" are
now simply whether the passphrase was successfully set or not, instead
of returning what the behavior of the UI should be (PageStatus). This
makes them less coupled with the existing callers.
- The Profile.SyncCustomize histogram is now recorded closer to where the
passphrase updates happen. This may ultimately cause changes in the
metric, but at least something meaningful will be recorded now. Seems the
histogram wasn't actively watched anyways (it expired twice). The obscure
buckets SYNC_ENCRYPT and SYNC_PASSPHRASE are also respectively renamed to
SYNC_CREATED_NEW_PASSPHRASE and SYNC_ENTERED_EXISTING_PASSPHRASE.
2021-02-04 23:52:20 -05:00
Deep 75b2fd92ad Fix lint error 2021-02-01 18:01:41 -05:00
Deep 28955d763e Fix #13871 2021-02-01 17:57:46 -05:00