Commit Graph
132 Commits
Author SHA1 Message Date
Mario Sanchez Prada 06f884ff74 Remove includes to base/macros.h using base/ignore_result.h when needed
Only a couple of files really need to include this header now to use
ignore_result(), and we can just drop the include from everywhere else.

Chromium changes:

https://chromium.googlesource.com/chromium/src.git/+/2e6be1400ab678f21d871d0d3a1199912967324f
https://chromium.googlesource.com/chromium/src.git/+/5666ff4f5077a7e2f72902f3a95f5d553ea0d88d
https://chromium.googlesource.com/chromium/src.git/+/3a3f9436142e712d4a7e2a962d85154876fa395f

commit 2e6be1400ab678f21d871d0d3a1199912967324f
Author: Peter Boström <pbos@chromium.org>
Date:   Sat Nov 13 01:28:25 2021 +0000

    Rename "base/macros.h" => "base/ignore_result.h"

    This file only contains ignore_result() and is no longer a collection of
    macros.

    This change fixes a couple of missing IWYU removals as well.

    Bug: 1010217

commit 5666ff4f5077a7e2f72902f3a95f5d553ea0d88d
Author: Peter Boström <pbos@chromium.org>
Date:   Fri Nov 12 03:40:24 2021 +0000

    Remove most remaining unused "base/macros.h"

    Removes `#include "base/macros.h"` from remaining .cc, .h and .mm files
    that do not contain `ignore_result(` and do not trigger pre-commit or
    pre-upload errors.

    Bug: 1010217

commit 3a3f9436142e712d4a7e2a962d85154876fa395f
Author: Peter Boström <pbos@chromium.org>
Date:   Mon Nov 8 21:04:37 2021 +0000

    Add #include "base/macros.h" for ignore_result()

    This fixes IWYU for existing instances of ignore_result() to make
    removal of #include "base/macros.h" from files using it for DISALLOW_*
    macros easier.

    Bug: 1010217
2022-01-24 15:33:44 -05: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
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 204de8080f sql::Statement::ColumnBlob() now returns base::span.
Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/1268a99

commit 1268a999c4a953d7e2b2c26bf9fa019e38ee0504
Author: Victor Costan <pwnall@chromium.org>
Date:   Fri Jul 16 17:16:39 2021 +0000

    sql: Change the Statement::ColumnBlob() return type to base::span.

    ColumnBlob() currently returns a pointer to a data buffer, which must be
    paired with the return result of ColumnByteLength(). This made sense
    when the code was written, but we have safer and more ergonomic
    alternatives now.

    This CL switches the return type to base::span<const uint8_t>, which is
    the closest reflection of the fact that BLOBs are arrays of bytes.
    sql::Statement still has helpers for retrieving BLOB data as std::string
    and std::vector<char> / std::vector<uint8_t>.

    Bug: 1229451
2021-09-13 14:52:55 -04:00
Mario Sanchez Prada f15fe540d8 Remove const qualifier for sql::Statement parameter
The sql::Statement parameter passed to DecryptedCardFromColumn()
can't be const as the method will call ColumnByteLength() over it,
which is no longer declared a const method.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/081d534f16b6b1523ca9a87a081285ab01d30265

commit 081d534f16b6b1523ca9a87a081285ab01d30265
Author: Victor Costan <pwnall@chromium.org>
Date:   Thu Jul 15 14:23:59 2021 +0000

    sql: Remove const qualifier from Statement::Column*() methods.

    The sql::Statement::Column*() methods are currently const, which
    suggests no internal state changes.

    This is incorrect for the following reasons.

    1. GetColumnType()'s comment indicates that Column*() perform SQLite
       type conversion. So, the methods appear to change the underlying
       SQLite state.
    2. In general, the methods call into SQLite, and we can't guarantee that
       SQLite state doesn't change.

    This CL fixes the problem by removing the const qualifier from the
    impacted methods.

    Bug: 1229420
2021-08-18 10:58:48 -04:00
Mario Sanchez Prada 55223c1eed Port away from deprecated ListValue::empty()
We should use GetList().empty() now.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/ffeeed8d45af58f284a8b3624491745e7b10d2b1

commit ffeeed8d45af58f284a8b3624491745e7b10d2b1
Author: Morten Stenshorne <mstensho@chromium.org>
Date:   Thu Jul 8 22:58:38 2021 +0000

    CodeHealth: Remove ListValue::empty()

    All usage should be replaced with Value::GetList()::empty() by now.

    Bug: 1187065
2021-08-18 10:57:38 -04: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
Brian Clifton 7b63e0b3f4 Remove brave_rewards_enabled build flag
Fixes https://github.com/brave/brave-browser/issues/14783
2021-08-03 13:49:59 -07:00
Mario Sanchez Prada 8d40791ea5 Migrate away from using ListValue's iterators
They are no longer available now and ListValue::GetList() should be
used instead now.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/fe59284a48bc5a3af8f058b048e3cc1fe260a1b9

commit fe59284a48bc5a3af8f058b048e3cc1fe260a1b9
Author: David Bertoni <dbertoni@chromium.org>
Date:   Thu May 13 22:46:56 2021 +0000

    [CodeHealth] Remove ListValue::begin()/end().

    This CL removes these deprecated member function.

    Bug: 1187107
2021-06-29 16:35:40 -04:00
mkarolin 0e7b362863 base::Optional -> absl::optional.
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/2d59e682ab9eb904124f5778eb8ceb3cb2a90231

commit 2d59e682ab9eb904124f5778eb8ceb3cb2a90231
Author: Anton Bikineev <bikineev@chromium.org>
Date:   Tue May 18 12:29:22 2021 +0000

    Deprecate base/optional.h and fix remaining mentions.

    Docs are still to be updated (in a followup).

    Bug: 1202909

Converted remaining cases of base::Optional to absl::optional, plus
updated DEPS file with an exception that is temporarily required
while we don't have such exception added to Chromium's toplevel DEPS
file (see commit linked below, not yet included in 92.0.4503.5).

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/9662571bb2954fb1759c49e5c45e59571cd1899e

commit 9662571bb2954fb1759c49e5c45e59571cd1899e
Author: Anton Bikineev <bikineev@chromium.org>
Date:   Thu May 13 19:17:50 2021 +0000

    Reland "Alias base::Optional to absl::optional"

    This relands f3493eb4f80c5716ed2d7de195f710537beacc6b. The reason of the
    failure: missing base// dep in some of the internal components, which
    caused the branded builds to fail.

    For sherrifs: the change may cause build failures on bots that are not
    tested in the regular CQ pipeline. Those issues are mostly caused by
    missing base// dependencies. Before reverting this change, please
    consider fixing missing dependencies, similar to what the CL 2891488
    does.

    Original CL description:
    > Alias base::Optional to absl::optional
    >
    > This CL does the following:
    > 1) Replaces base::Optional and friends with aliases to corresponding
    > entities from abseil. base::in_place is the only thing not aliased, as
    > it's also used in other contexts (e.g. StructPtr in mojo).
    > 2) Replaces all optional-related uses of base::in_place with
    > absl::in_place.
    > 3) Fixes missing headers (e.g. base/check.h) that used to be recursively
    > included from base/optional.h
    > 4) Also, removes forward declarations for base::Optional and instead
    > includes "base/optional.h" directly. The argument is the same as for
    > forward declarations of std types - the exact declaration (struct vs
    > class, number of template arguments (e.g. for SFINAE)) is an
    > implementation detail that can change.
    >
    > The CL also tries to support base/optional_unittest.cc (will be removed
    > with base/optional.h) however the nocompile is already removed, since
    > supporting it seems to be harder.
    >
    > Followup CLs will replace base::optional with absl::optional per
    > component.
    >
    > Bug: 1202909
    > Change-Id: I25b276401ceba13da35b3a0331d5ccbd338c4539
    > AX-Relnotes: n/a.
    > Reviewed-on:
    > https://chromium-review.googlesource.com/c/chromium/src/+/2892208
    > Commit-Queue: Anton Bikineev <bikineev@chromium.org>
    > Commit-Queue: Peter Kasting <pkasting@chromium.org>
    > Reviewed-by: Peter Kasting <pkasting@chromium.org>
    > Reviewed-by: Kentaro Hara <haraken@chromium.org>
    > Owners-Override: Peter Kasting <pkasting@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#882460}

    Bug: 1202909
2021-06-29 16:35:39 -04:00
Mario Sanchez Prada b3a3e4558b Migrate usage of base::[ASCII|UTF8]ToUTF16 to u literals.
We need to use either u"..." literals or char16_t constant strings now.

Chromium changes:

https://chromium.googlesource.com/chromium/src.git/+/522370fb5f2b8ec0719a3752bcac4897164dd32d

commit 522370fb5f2b8ec0719a3752bcac4897164dd32d
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Fri Apr 16 17:22:39 2021 +0000

    [LSC] Disallow base::ASCIIToUTF16("...") outside of tests

    This change modifies base::ASCIIToUTF16 to cause compilation errors when
    it is used with a string constant outside of tests. Instead, callers
    should just use a UTF16 literal (u"...") instead.

    Bug: 1189439

https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd

commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Sun Mar 14 19:37:05 2021 +0000

    [LSC] Remove base/strings/string16.h

    This change removes base/strings/string16.h and remaining references to
    it from the code base.

    Bug: 1184339

commit 9ca8a38a28e547d0c47630e3e56a69d06c7ab68b
Author: Peter Kasting <pkasting@chromium.org>
Date:   Wed May 12 03:08:22 2021 +0000

    Ban UTF8ToUTF16 on compile-time string constants.

    Bug: 1189439
2021-06-29 16:35:01 -04:00
Simon Hong bd79338b79 Deleted chrome/utility/services.cc patch
fix https://github.com/brave/brave-browser/issues/16457

Used BraveContentUtilityClient::RegisterMainThreadServices() instead.
2021-06-16 11:42:00 +09:00
Mario Sanchez Prada 79af4bc963 Replace all usage of base::string16 with std::u16string
The "base/strings/string16.h" file does no longer exist and we need
to remove all remaining usages of that type with the one from the
C++ standard library instead, like Chromium upstream already did.

Also replaces no longer needed ASCIIToUTF16 and UTF8ToUTF16 calls used
with constant strings with `u` string literals.

Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd

commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Sun Mar 14 19:37:05 2021 +0000

    [LSC] Remove base/strings/string16.h

    This change removes base/strings/string16.h and remaining references to
    it from the code base.

    Bug: 1184339
2021-05-05 12:03:20 +02:00
Mario Sanchez Prada b7e4c1a82f Fix GN dependencies in //brave/utility
We had made services.cc depend on //brave/utility via a chromium_src
override, but that caused a dependency cycle because //brave/utility
also depends on //chrome/utility (e.g. extend some upstream classes),
causing a gn check error.

To fix this, we can follow the pattern used in other places and make
upstream's //chrome/utility directly include the files from Brave that
it needs, and replace the oneliner patch to //chrome/utility/BUILD.gn
with one that would simply include those sources, instead of having it
depend on //brave/utility.

Last, we also add a missing dep on //brave/common/importer:importer
to avoid another gn check failure due to having some files from that
target included from brave_external_process_importer_bridge.h.

Resolves https://github.com/brave/brave-browser/issues/10623
2021-04-22 11:06:47 +02:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
mkarolin c37e44d128 GetBlacklistLogins -> GetBlocklistLogins
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/c01e115c2633e007d23be7ecc69c092b1cc7a933

commit c01e115c2633e007d23be7ecc69c092b1cc7a933
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Thu Dec 10 15:51:48 2020 +0000

    [Passwords] Replace Blacklist with Blocklist in PasswordStore and others

    This change replaces usages of Blacklist with Blocklist in the
    PasswordStore, LoginDatabase and fixes comments that were missed in
    other places. Note that this change does not yet rename the actual SQL
    columns in the Login Data database.

    Bug: 1147799
2021-02-04 23:52:15 -05:00
mkarolin 03e9610f52 autofill::PasswordForm was removed from importer.
Chromium changes:

https://chromium.googlesource.com/chromium/src.git/+/3bbb69a821f89abf22beab20b1eabc015a71d8ab

commit 3bbb69a821f89abf22beab20b1eabc015a71d8ab
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Tue Nov 3 06:59:57 2020 +0000

    [Passwords] Remove autofill::PasswordForm from //chrome/*/importer

    This change replaces most usage of autofill::PasswordForm in the
    importer code and uses a new importer::ImportedPasswordForm struct
    instead.

    This is necessary, because PasswordForm is being moved to the //browser
    component, and thus is no longer accessible from other components like
    //common or //utility.

    Bug: 1067347

https://chromium.googlesource.com/chromium/src.git/+/9c84018d43d95b8c7ca850653af9452b4edc895b

commit 9c84018d43d95b8c7ca850653af9452b4edc895b
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Tue Nov 3 09:57:10 2020 +0000

    [Passwords] Move password_form.h to //components/password_manager

    This change moves password_form.h and password_form.cc from
    /autofill/core/common to /password_manager/core/browser and fixes
    remaining compilation issues.

    Bug: 1067347
2020-12-08 15:25:51 -05:00
Simon Hong 9266cdf23d Revert "Revert "Revert "Import History from Safari"""
This reverts commit 02814998e1110acf2c4c59b4b47eb6436c15a784.

We will not support history import from safari as chrome doesn't support it.
2020-10-28 14:04:01 -04:00
Simon Hong 2981a53e0f Revert "Fix safari history import"
This reverts commit f42f9b0bed2185d175a53a71cc451f58eed4b55f.

We will not support history import from safary as chrome doesn't support it.
2020-10-28 14:04:01 -04:00
Simon Hong b3036e24a0 Fix safari history import
Makes all supported import service available always.
2020-10-28 14:04:00 -04: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
Jocelyn Liu 5c3997fadd Fix bat/ads/ads.h and bat/ledger/ledger.h file not found
Without this, will get build error like:
In file included from
/brave/src/brave/chromium_src/chrome/utility/services.cc:32:
../../brave/components/services/bat_ads/bat_ads_service_impl.h:13:10:
fatal error: 'bat/ads/ads.h' file not found
2020-09-11 17:00:51 -07:00
Jocelyn Liu 6d2867a9de Migrate BatAds and BatLedger services off service manager 2020-09-11 17:00:49 -07:00
Jocelyn Liu f40baf0a7b Migrate TorLauncher off service manager 2020-09-11 16:57:56 -07:00
Max Karolinskiy 04a3398010 [Unit tests] Updated to inclusive terminology.
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/fda91a16b26c0ca74757c335e6128c5a04fa173b

commit fda91a16b26c0ca74757c335e6128c5a04fa173b
Author: Avi Drissman <avi@chromium.org>
Date:   Fri Jun 26 21:38:47 2020 +0000

    Use inclusive terminology in components/autofill

    Bug: 1099072
2020-09-11 14:45:32 -04: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
Mario Sanchez Prada 462f62a19e Update calls to base::DeleteFile(path, recursive) to new APIs
Calls to DeleteFile(path, true) become DeleteFileRecursively(path),
and calls to DeleteFile(path, falsee) become DeleteFile(path).

Then, DeleteFileRecursively became DeletePathRecursively.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/9382efe14df0303a66a78e6dee4ee8f91436d994

commit 9382efe14df0303a66a78e6dee4ee8f91436d994
Author: Lei Zhang <thestig@chromium.org>
Date:   Sat Jul 25 20:52:14 2020 +0000

    Remove deprecated 2-param base::DeleteFile().

    Convert the few remaining callers within base/.

    Bug: 1009837

https://chromium.googlesource.com/chromium/src/+/746ce47465d3549e5345c5986bf4b92e80d6f0bb

commit 746ce47465d3549e5345c5986bf4b92e80d6f0bb
Author: Lei Zhang <thestig@chromium.org>
Date:   Wed Jul 1 04:39:45 2020 +0000

    Rename base::DeleteFileRecursively() to DeletePathRecursively().

    Take the name suggestion from several reviewers while converting
    base::DeleteFile(path, true) calls.

    Tbr: blundell@chromium.org,jamiewalch@chromium.org,jkarlin@chromium.org,kinuko@chromium.org,reillyg@chromium.org,sdefresne@chromium.org,xdai@chromium.org
    Bug: 1009837
2020-09-11 14:45:31 -04:00
Mario Sanchez Prada dfa43a645d Convert to new mojo types for uses of the old mojom::ServiceRequest
This means renaming uses of ServiceBinding to ServiceReceiver, as
well as removing any use of the old InterfaceRequest<T> type (e.g.
used by the ServiceRequest alias) and use PendinReceiver<T> instead.

Chromium change:

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

commit bb551f12072ebf7a9af6df26a51d125f90078453
Author: Gyuyoung Kim <gyuyoung@igalia.com>
Date:   Thu Jul 2 00:12:00 2020 +0000

    Convert mojom::ServiceRequest to PendingReceiver<mojom::Service>

    There are many uses of mojom::ServiceRequest. This CL migrates
    them to PendingReceiver<mojom::Service>.

    Besides that, ServiceBinding is renamed to ServiceReceiver and
    the variable name is also changed from |binding_| to |receiver_|
    or |service_binding_| to |service_receiver_|.

    Bug: 955171
2020-09-11 14:45:30 -04:00
Jocelyn Liu 808e73054c Implement IPFS service in utility process 2020-09-02 11:10:39 -04:00
Pranjal Jumde 9c2501854e Fix 9365: Add gn check to npm scripts 2020-07-20 09:58:02 -07:00
Simon Hong c0ad2a0d79 Use separated service for brave's importing
ChromeImporter runs in a separated service from upstream import service.
This new import service will use chrome::mojom::ProfileImportObserver and
brave::mojom::ProfileImportObserver and they are passed via
brave::mojom::ProfileImport.

brave::mojom::ProfileImportObserver and BraveImportBridge only define additional
interface.
2020-06-19 18:45:29 +09:00
Simon Hong 7fbce9e9d9 Import payments info from chrome 2020-06-19 17:18:21 +09:00
Simon Hong c9050d2f8e Import History from Safari 2020-05-27 15:35:29 +09:00
Simon Hong 38b53f38a4 Handle temp file copy failure 2020-05-12 11:57:59 +09:00
Simon Hong c26d326491 Just warning if browser detect chrome is running while importing
With this warning dialog, user will close chrome windows.
After that user clicks continue button, browser will not check lock again aind
will try to import chrome's settings.
Even if chrome is still running, importing will be done because
importing is done with temporarily copied db files.
2020-05-12 11:35:47 +09:00
Simon Hong 80bfef0010 Fix chrome password importing is failed on Win
To read chrome's login data, chrome's encryption key is used.
To do this, fetching key from local prefs and set it in importing
service process.
2020-04-22 09:15:22 +09:00
Simon Hong 0dc9d8c84a Delete muon import feature 2020-03-26 10:38:07 +09:00
Simon Hong 345327f1ee Do more cleanup to avoid patch around importer module. 2020-03-25 09:21:01 +09:00
Simon Hong 1507334151 Enable extensions importing from Chrome
BraveExternalProcessImporterHost will fetch available extensions list
and ask to install them.
Other importing options are done via other utility process but
importing extension should be done in browser process.
So, BraveExternalProcessImporterHost manages extension installs.

BraveExternalProcessImporterHost will fetch available extensions list
and ask to install them.
Other importing options are done via other utility process but
importing extension should be done in browser process.
So, BraveExternalProcessImporterHost manages extension installs.

NOTE: this commits has many cleanup changes around importing area
that uses deprecated patching style.

fix https://github.com/brave/brave-browser/issues/7974
2020-03-25 09:21:01 +09:00
mkarolin 34a4293a8a BindInt(64) require exact type.
Chromium change:

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

commit f070ffde7ce159aa8687e850b95c2a54f8caf5d3
Author: Joshua Bell <jsbell@chromium.org>
Date:   Tue Dec 10 19:44:51 2019 +0000

    SQL: Disallow implicit integer downconversion on BindInt

    Calling sql::Statement::BindInt() with an int64_t argument silently
    downconverted, potentially saving incorrect data to a database.
    sql::Statement::BindInt64(int64_t) should be used instead.

    Introduce an uncallable sql::Statement::BindInt(int64_t) overload to
    fail the compile. This also catches calling BindInt with uint32_t. Fix
    up various callers that were silently downconverting.

    Bug: 908690
2020-03-19 16:51:33 -04:00
Brian Clifton 875dd4667c lint fixes 2019-12-12 23:09:59 -07:00
Ivan Efremov 36ccfa29bc Issue 7044: Erase unneeded test. 2019-12-12 22:06:27 +07:00
Ivan Efremov 0b1a2dacc2 Issue 7044: Do not import cookies from Chrome and Firefox.
Note: we do not import cookies from Safari, so nothing to disable.
2019-12-10 21:55:07 -07:00
mkarolin 3ec35dbaf3 Lint fixes. 2019-11-27 15:57:50 -05:00
mkarolin d53186403c ExternalProcessImportBridge now uses mojom observer.
Chromium change:

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

commit aa59e9ec484ceff647a58e58fa16e1ee784d157f
Author: Henrique Ferreiro <hferreiro@igalia.com>
Date:   Tue Sep 24 08:38:14 2019 +0000

    Migrate profile_import.mojom to the new Mojo types

    Convert the implementation and all users of the
    chrome::mojom::ProfileImportObserver interface.

    Bug: 955171
2019-11-27 15:57:48 -05:00
Simon Hong bc513dbfd3 Fix cookies are not imported from Chrome
Since the V11 cookies db schema, firstpartyonly column is renamed to samesite.
Also, BraveImporter and ChromeImporter should have different cookies query
string because muon uses old schema.
2019-10-29 17:52:01 +09:00
mkarolin a558f1e877 LoginDatabase account vs profile scoped.
Chromium changes:

https://chromium.googlesource.com/chromium/src/+/0b653a39fe832ec8366948cc343f2b5a97ab57fa

commit 0b653a39fe832ec8366948cc343f2b5a97ab57fa
Author: Marc Treib <treib@chromium.org>
Date:   Tue Sep 3 11:00:37 2019 +0000

    Clear the account-scoped PasswordStore on signout

    This adds an "is_account_store" flag to LoginDatabase, which specifies
    whether this DB stores profile-scoped or Gaia-account-scoped data.
    Sync uses this flag to clear the account-scoped data on signout.
    In the future, the flag will also be used by the DB itself to "tag"
    credentials it returns as coming from the account or from the profile.

    Bug: 998455

https://chromium.googlesource.com/chromium/src/+/00380bfbde67971670a4e4afcaa513622905d8a5

commit 00380bfbde67971670a4e4afcaa513622905d8a5
Author: Marc Treib <treib@chromium.org>
Date:   Wed Sep 4 08:04:37 2019 +0000

    LoginDatabase: Use a strong alias for is_account_store param

    With this change, callers have to write
    new LoginDatabase(path, IsAccountStore(true))
    instead of
    new LoginDatabase(path, /*is_account_store=*/true)
    which is clearer (no way to forget the comment), especially if any
    other (boolean) parameters are added at any later point.

    Bug: 998455
2019-10-09 21:50:28 -04:00
Max Karolinskiy 7d38f211bc Lint fixes. 2019-09-06 13:25:38 -04:00