31 Commits
Author SHA1 Message Date
Artem Samoilenko 2b1420fc06 [cr149][Android] Fixes for the [unchecked] warning
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7d3c16b9bb778a09b643288fe47bae4c1d8e53b7

commit 7d3c16b9bb778a09b643288fe47bae4c1d8e53b7
Author: Jingping Sun <jings@microsoft.com>
Date:   Mon Apr 27 10:58:12 2026 -0700

    [Unchecked] Enable -Xlint:unchecked for Chromium-owned code

    Conditionally append -Xlint:unchecked to the base javac flags only when
    options.chromium_code is true. This makes javac fail the build on any
    new unchecked-conversion / heap-pollution / raw-type warnings in
    Chromium-owned Java code, while leaving synced third-party Java sources
    (chromium_code=false; auto-defaulted for third_party/ paths without
    org.chromium namespace) compiled silently as before.

    Why conditional, not global: Synced third-party Java code under
    third_party/{junit,google-truth}/ src/ contains unchecked-warning sites
    we cannot fix in chromium code base.

    Bug: 358366667
    Change-Id: I904b09cd4484098cee3b59e6d4aae94eba8d33ae
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7790536
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Peter Wen <wnwen@chromium.org>
    Commit-Queue: Jingping Sun <jings@microsoft.com>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1621171}
2026-05-22 16:57:27 -04:00
Claudio DeSouza 9cfaf652ae [cr148] PasswordManagerSettingsServiceFactory under factories
This affects how targets are added now, and a shadow file had to be
corrected.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/bd7255bd8bf88581d34c38be1b16b05f7d5703b6

commit bd7255bd8bf88581d34c38be1b16b05f7d5703b6
Author: Vasilii Sukhanov <vasilii@chromium.org>
Date:   Tue Mar 31 05:13:51 2026 -0700

    Refactor: Move PasswordManagerSettingsServiceFactory to factories/

    Moves password_manager_settings_service_factory.{h,cc} from
    //chrome/browser/password_manager/ to
    //chrome/browser/password_manager/factories/.

    Eliminates the `password_factory_headers` source_set in
    factories/BUILD.gn and wires everything cleanly to the unified
    //chrome/browser/password_manager/factories target. All internal include
    directives and BUILD.gn usages across webauthn, webid, autofill,
    ui/passwords, and actor_login were adjusted properly.

    Bug: 353332589
    Change-Id: I318230d1df39b0b849a026977f00f2d3d0047831
    Bypass-Check-License: moving the files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7710837
    Reviewed-by: Friedrich Hauser <friedrichh@chromium.org>
    Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1607791}
2026-04-27 12:00:58 +01:00
Claudio DeSouza fc79d495fc [cr148] Password store factory headers moved
These are now under chrome/browser/password_manager/factories/.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/36cbca739593ae8b8cb3c01ac064b875f310bc15

commit 36cbca739593ae8b8cb3c01ac064b875f310bc15
Author: Vasilii Sukhanov <vasilii@chromium.org>
Date:   Tue Mar 31 04:21:53 2026 -0700

    Move password store factories from //chrome/browser to the smaller
    target in chrome/browser/password_manager/factories/BUILD.gn.

    Bug: 353332589
    Change-Id: I3b19769f13af5db892c4dda03ab3dca40ef2dbd5
    Bypass-Check-License: Moving files, no license changes.
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7702977
    Reviewed-by: Friedrich Hauser <friedrichh@chromium.org>
    Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1607775}
2026-04-27 12:00:57 +01:00
Oliver 3660b3622a Android: Implement favicons for Password Manager entries (#33868)
* Android: Implement favicons for Password Manager entries

We now display favicons for Password Manager as happens for our desktop
edition.

In order to do this, the C++ side now passes in the full origin so that
we have the clean, proper URI in order to fetch the favicon.

Resolves brave/brave-browser#52775
2026-04-08 18:56:21 +02:00
Artem Samoilenko 136cfc674a [cr147][Android] Changes for null-annotated RootUiCoordinator
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/61a82a1566fd970e84e97a209528055da082b76e

commit 61a82a1566fd970e84e97a209528055da082b76e
Author: Henrique Nakashima <hnakashima@chromium.org>
Date:   Mon Mar 2 13:10:58 2026 -0800

    [Android] Null-annotate RootUiCoordinator (part 5)

    This CL focuses on ModalDialogManager.

    In different places it's nullable or not, and it is sometimes passed as
    a Supplier and sometimes not. Generally, ChromeBaseAppCompatActivity has
    a MonotonicObservableSupplier which in some subclasses never gets set,
    but in the ones that create a RootUiCoordinator, the provider is set
    before the RootUiCoordinator is created.

    I've tried to keep Suppliers where instances are mostly passed via
    Supplier and the actual ModalDialogManager where the Suppliers have
    generally already been resolved.

    Reduced NullAway errors down to 69 again.

    Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
    Change-Id: I081f4cfab1a80dc074b2886a0ff59cb176feff30
    Bug: 485252552
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7604913
    Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1592697}
2026-03-26 19:55:30 -04:00
Artem Samoilenko 79cb1bbb57 [cr145][Android] Replace JavaParamRef -> JavaRef
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0d6ec7e0f328e9ddd6f5174f61676ff85c777af6

commit 0d6ec7e0f328e9ddd6f5174f61676ff85c777af6
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Tue Dec 2 12:37:02 2025 -0800

    Android: Replace JavaParamRef -> JavaRef (part 5)

    JavaParamRef used to be different, but now is an alias for JavaRef.

    Bug: 40173007
    Change-Id: I9bfa2fcdd012fc90859886ee2e747cb360733421
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7217772
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Martin Kong <martinkong@google.com>
    Cr-Commit-Position: refs/heads/main@{#1553033}
2026-01-29 13:40:24 -05:00
Artem Samoilenko a79268cd0e [cr145][Android] Add DEFINE_JNI macro to the end of every file (part 1)
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/37865ec47270489182e954bb9a6dc32c04fd51d7

commit 37865ec47270489182e954bb9a6dc32c04fd51d7
Author: Martin Kong <martinkong@google.com>
Date:   Mon Dec 1 08:47:18 2025 -0800

    Add DEFINE_JNI macro to the end of every file (part 1)

    This CL adds DEFINE_JNI(ClassName) macro to the end of every file
    that includes ClassName_jni.h. Currently the macro expands to nothing.

    Bug: 346596940
    Change-Id: I61da4d1cc46f71d8ede30f74b267237a5f8cf14f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206009
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Auto-Submit: Martin Kong <martinkong@google.com>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1552186}
2026-01-29 13:40:19 -05:00
Artem Samoilenko 6fa6898c28 [cr145][Android] Split ObservableSupplier into Nullable / Monotonic / NonNull variants
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/416a61c418c152a7a7ae568d89302e5ecb6e4a3d

commit 416a61c418c152a7a7ae568d89302e5ecb6e4a3d
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Tue Dec 2 14:13:59 2025 -0800

    Android: Split ObservableSupplier into Nullable / Monotonic / NonNull variants

    The goal is to use proper @Nullable annotations with
    ObservableSuppliers.

    To achieve this, we use interfaces that define nullness:
     * (Settable)NullableObservableSupplier
     * (Settable)ObservableSupplier <-- monotonic
     * (Settable)NonNullObservableSupplier

    And we have ObservableSupplierImpl implement all of them.

    In order to make this migration manageable, I've marked the interfaces
    as @NullUnmarked, and will fix annotations in batches until they
    can be marked @NullMarked.

    This CL includes a batch in order to test out the new interfaces (and
    because many were necessary to make the change).

    Monotonic suppliers are by far the most common afaict, so that's why
    the non-prefixed ObservableSupplier is the monotonic one (that, and
    because "Monotonic" is a mouthful).

    One implication of this approach is that we'll never have:
       ObservableSupplier<@Nullable Foo>
    We'd have instead:
       NullableObservableSupplier<Foo>

    Having the nullness in the interface rather than in the generic
    allows for defining toNonNull() only on monotonic suppliers, and
    simplifies the implementation.

    Bug: 455874046
    Change-Id: Id48e235b9ff16a5b21a9c1199863150d17c22736
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206746
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1553094}
2026-01-29 13:40:19 -05:00
cdesouza-chromium 44dd177f5d [IWYU] base/memory/scoped_refptr.h in //brave/browser (#32381)
This PR does some IWYU for `base/memory/scoped_refptr.h` under
`//brave/browser`. This uses the standard script with the following
dataset:

```
HEADER_FUNCTION_SETS = [
    (
        '"base/memory/scoped_refptr.h"',
        (
          "scoped_refptr",
        ),
    ),
]
```

Bug: https://github.com/brave/brave-browser/issues/42212
2025-11-18 15:14:30 +00:00
Oliver 96d6a8414f [Android] Fix usage of Import Password localisation string substitution (#31978)
When we fetch localisation strings which have different cases for
singular and plural, we should pass the count twice.

This is because the first argument determines whether the singular or
plural form will be used and the second one is used for substitution.

Technically, we could hard-code the first count param as a numeric
literal, but this gains us nothing and it is the opinion of the author
that using the variable as a single-source-of-truth is the better
approach.

Resolves brave/brave-browser#50245
2025-10-29 14:38:38 +00:00
AlexeyBarabash 22b0aa5f14 [cr142][Android] Do not remove login db
Upstream removes login database during pref migration on Android.
We need to keep it otherwise passwords are wiped and recreated on
each app start.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/62fdf60f5e40bb6fc6bf31d292482c353be23dcc

	[passwords/android] Drop fallback deletion of downloaded CSV on startup

	UMA indicates this code path isn't exercised. Worst case, if the
	deletion fails, the CSV can be downloaded again.

	Unrelated to that: inline the code that deletes the LoginDatabase
	files in browser_prefs.cc and move it to the bottom of the file. This
	means the code will go away 1 year from now during browser_prefs
	clean-up, without requiring any additional clean-up password manager
	code.

	OBSOLETE_HISTOGRAM[PasswordManager.AccountLoginData.RemovalStatus]=The deletion is done unconditionally and does not need metrics anymore
	OBSOLETE_HISTOGRAM[PasswordManager.ProfileLoginData.RemovalStatus]=The deletion is done unconditionally and does not need metrics anymore
	OBSOLETE_HISTOGRAM[PasswordManager.UPM.AutoExportedCsvStartupDeletionSuccess]=The startup CSV deletion was removed

	Bug: 442347616
	Change-Id: I5c18bdbb9cda6b37ae6f05540746bfb9cc4fe12c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6913683
2025-10-15 20:31:30 -04:00
AlexeyBarabash 8054d985d8 [cr142][Android] More Android passwords stuff deleted
- kLoginDataForProfileFileName;
- kLoginDataJournalForProfileFileName;
- MaybeDeleteLoginDatabases.

Chromim change:
https://source.chromium.org/chromium/chromium/src/+/62fdf60f5e40bb6fc6bf31d292482c353be23dcc

	[passwords/android] Drop fallback deletion of downloaded CSV on startup

	UMA indicates this code path isn't exercised. Worst case, if the
	deletion fails, the CSV can be downloaded again.

	Unrelated to that: inline the code that deletes the LoginDatabase
	files in browser_prefs.cc and move it to the bottom of the file. This
	means the code will go away 1 year from now during browser_prefs
	clean-up, without requiring any additional clean-up password manager
	code.

	OBSOLETE_HISTOGRAM[PasswordManager.AccountLoginData.RemovalStatus]=The deletion is done unconditionally and does not need metrics anymore
	OBSOLETE_HISTOGRAM[PasswordManager.ProfileLoginData.RemovalStatus]=The deletion is done unconditionally and does not need metrics anymore
	OBSOLETE_HISTOGRAM[PasswordManager.UPM.AutoExportedCsvStartupDeletionSuccess]=The startup CSV deletion was removed

	Bug: 442347616
	Change-Id: I5c18bdbb9cda6b37ae6f05540746bfb9cc4fe12c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6913683
2025-10-15 18:32:10 -04:00
AlexeyBarabash b8a401a408 [cr142][Android] Removed prefService arg from PasswordsPreference.setUpPostDeprecationWarning
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9ec1da1e3ee297774e7810927748e95b96da9ceb

	Remove unused PrefService arg from IsPasswordManagerAvailable()

	Became unused in https://crrev.com/c/6859683.

	Bug: 378652343
	Change-Id: I00e5d61ecb7c72e0602de156499551ca19c6ec1f
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6888810
2025-10-15 18:31:56 -04:00
AlexeyBarabash 06a93942af [cr142][Android] Flag use_login_database_as_backend was removed
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1ee2db9e76c64c1e2cd108826ec8c91d0c3d8f44

	[android/passwords] Stop compiling LoginDatabase (pt 2)

	Removes the use_login_database_as_backend gn arg and corresponding
	buildflag. Stops compiling the following files:
	- password_store_built_in_backend*
	- login_database*
	- insecure_credentials_table*
	- password_notes_table*
	- statistics_table*

	Fixed: 378652343
	Change-Id: Ic0dc815f7eb76facf5341ef901e11963677dce57
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6888572
2025-10-15 18:31:56 -04:00
AlexeyBarabash 6a842ca445 [cr142][Android] Chromium removed stuff around password manager
- password_manager::RegisterLegacySplitStoresPref
 - password_manager::SetLegacySplitStoresPrefForTest
 - kUpmUnmigratedPasswordsExported
 - kEmptyProfileStoreLoginDatabase

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/e4d18fe2cd562dd016dafc60cdfe18b1bf2488f2

	[android/passwords] Stop compiling LoginDatabase (pt 1)

	Stops auto-exporting the LoginDatabase to a CSV in the Chrome app
	data folder. Existing CSVs are left untouched and the UI to move them
	to a different folder is still around. IsPasswordManagerAvailable()
	now only depends on GmsCore version and the presence of the internal
	backend.

	Removes:
	- kUpmUnmigratedPasswordsExported pref
	- kPasswordsUseUPMLocalAndSeparateStores pref
	- kEmptyProfileStoreLoginDatabase pref
	- LoginDbDeprecationRunner and friends

	OBSOLETE_HISTOGRAMS=The LoginDatabase auto-export was removed

	Bug: 378652343
	Change-Id: I7c8cd9e9d0adf35643634b15ef375153aa11d444
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6859683
2025-10-15 18:31:56 -04:00
AlexeyBarabash 127c5bd274 [cr142][Android] Removed PrefService arg from PasswordStore::Init()
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/eeb729bee73a7e907d523ed6323b3f6ebc096712

	Remove PrefService arg from PasswordStore::Init()

	The value is never consumed in any useful way.

	Bug: None
	Change-Id: Ib75a9994c1660389eefac4ab3bae8a65eaac7fdb
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6909108
2025-10-15 18:31:55 -04:00
AlexeyBarabash 9a0ce523c0 [Android][Codehealth] Backport PasswordSettingsSearchTest (#31634)
* [Android][Codehealth] Backport PasswordSettingsSearchTest
Resolves: https://github.com/brave/brave-browser/issues/49683

* [Android] Fixed password search
Resolves: https://github.com/brave/brave-browser/issues/49778
2025-10-07 23:38:35 +01:00
Oliver 5addb66841 [Android] Support import of passwords from CSV (#31056)
* [Android] Refactor PasswordSettings.java to use an XML layout file.

The PasswordSettings.java file now integrates with a new XML file that
contains the layout for the page. This modification was completed using
Cursor but does not appear to have introduced any breaks.

There should be no semantic changes caused by this commit and the Brave
Password settings screen should continue to function exactly as it did
prior to this commit.

* [Android] Introduce new Import/Export items to password manager menu.

The password manager dialog now features two items for export and
import. Prior to this commit, Export was hidden away in a small
drop-down menu accessible from the top-right of the screen.

The import item is also present, but non-functional in this commit.

* [Android] Implement importing passwords from CSV.

We now support importing a CSV file containing the user's passwords.
This commit builds upon its parent by implementing the necessary code to
call Chromium's password manager which is responsible for executing the
import.

Additionally, the icons in the password manager screen have been changed
to new ones taken from Google's Material UI icon set.

Localisation strings have been introduced - some of which are copied
from Google's base since, after discussion, this is the way we currently
make strings usable for Android. If this changes in future, these could
be de-duplicated. Translations into other languages are still necessary
since only English is implemented.

Closes brave/brave-browser#35729
2025-09-24 16:07:14 +02:00
Artem Samoilenko a5562072d1 [cr141][Android] Use java.util.function.Supplier rather than Chrome's copy of it
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/94e940f0ad7bd5d37452ee71ab06fe87d675afb2

Use java.util.function.Supplier rather than Chrome's copy of it.
This is 99% sed + git cl format.

The 1% was a couple shims to not break internal builds.
See PS1->PS5 for them.

Bug: 440309602
Change-Id: I9ff8438583286b238505c4f63062279c7b24b254
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6897327
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1507988}
2025-09-22 15:02:14 -04:00
Artem Samoilenko 39c30d2d47 [cr141][Android] Moves PasswordManagerHelper code to BravePasswordManagerHelper
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d0940950fdb4359249fe5ee6018a76668e9c2b9e

commit d0940950fdb4359249fe5ee6018a76668e9c2b9e
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Thu Aug 21 12:19:31 2025 -0700

    Remove unused code in PasswordManagerHelper

    Bug: None
    Change-Id: I8249cb0a4e8273a819307dbfd5bbddc3d2b0b6ce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6870717
    Commit-Queue: Victor Vianna <victorvianna@google.com>
    Auto-Submit: Victor Vianna <victorvianna@google.com>
    Reviewed-by: Ivana Žužić <izuzic@google.com>
    Cr-Commit-Position: refs/heads/main@{#1504668}
2025-09-22 14:59:49 -04:00
Artem Samoilenko 16c759ecb2 [cr141][Android] Password manager presubmit error fix 2025-09-22 14:59:37 -04:00
AlexeyBarabash d7256b1461 [cr140][Android] Backport built-in Password Manager (#30433)
Starting from cr140 Password manager was removed from Android.

This commit switches Android to use the same PasswordManagerSettingsService
as Desktop does.
Also backports upstream's Password Manager classes and resources used at cr139.

Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/7511b67d9208bd10463c1e5752976346ab6bd207
	[LoginDbDeprecationAndroid] Remove last usages and delete the flag

https://source.chromium.org/chromium/chromium/src/+/5794e9a0461497b7b810e9366c1c53eab711b6f2
	[passwords/android] Limit kPasswordsUseUPMLocalAndSeparateStores access

https://source.chromium.org/chromium/chromium/src/+/6875d2ce472e7f2097617525feec45313602e225
	[passwords/android] Remove unused password checkup UI

https://source.chromium.org/chromium/chromium/src/+/3662471ee9fabd6d1777b1d5316f0b9eede0f115
	[passwords/android] Remove unused PasswordSettings.java

Or see the log for `chrome/browser/password_manager/android/` directory
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/password_manager/android/;bpv=1
2025-08-20 01:06:59 +03:00
Emerick Rogul deb714325f [cr140] Deps fixes 2025-08-19 19:54:35 +01:00
AlexeyBarabash 83549fa633 [cr140][Android] kPasswordsUseUPMLocalAndSeparateStores moved to anonymous namespace
Updated BravePasswordManagerAndroidUtilTest.
Replaced MaybeDeleteLoginDatabases with an empty implementation.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/5794e9a0461497b7b810e9366c1c53eab711b6f2

	[passwords/android] Limit kPasswordsUseUPMLocalAndSeparateStores access

	No behavior change.
	Instead of allowing arbitrary reads/writes to this three-state pref
	(kOff/kOffAndMigrationPending/kOn), this CL exposes a minimal API to
	satisfy production needs. This should prevent bugs like
	crbug.com/428667627 and make it easier to get rid of the pref in the
	future. The API consists of:
	1. (existing) A bool getter which treats kOff and
	   kOffAndMigrationPending alike. It is renamed to include "Legacy"
	   and thus discourage new usages.
	2. (new) A test-only bool setter. The pref is not updated in production
	   ever since LoginDbDeprecationAndroid launched.
	3. (new) A function for pref registration.

	Besides that:
	* Rename SetUsesSplitStoresAndUPMForLocal() to
	  MaybeDeleteLoginDatabases(), since it doesn't set the pref at all
	  anymore.
	* Stop unnecessarily setting the pref in tests where
	  UsesSplitStoresAndUPMForLocal() is never called (verified by
	  temporarily replacing the implementation with NOTREACHED and observing
	  whether the test crashes).
	  This definition of "unnecessary" is rather conservative, but handling
	  more tests is left for future CLs.

	After this CL the legacy pref is only read in these places (only public
	APIs are listed, not internal helpers):
	 * MaybeDeleteLoginDatabases()
	 * IsPasswordManagerAvailable()
	 * LoginDbDeprecationReady()
	 * LoginDbDeprecationRunnerFactory::GetForProfile()

	Bug: 433682805
	Change-Id: I987c653cdae9d9c862b80686950902dac9d27e9a
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6691158
2025-08-19 19:54:29 +01:00
cdesouza-chromium feb56e3c68 [iwyu] Fixing inclusions for string_number_conversions.h (#29269)
Files that use base::NumberToString() and friends should include
string_number_conversions.h directly instead of depending on transitive
includes from far away.

This is a mechanical change done with the following script.

```
remove_header_if_unused() {
    files=$(git grep -l "base/strings/string_number_conversions.h")
    for file in $files; do
        if ! git grep -qE "base::NumberToString|base::StringToInt|base::StringToUint|base::StringToSizeT|base::StringToDouble|base::HexEncode|base::AppendHexEncodedByte|base::HexStringTo" "$file"; then
            sed -i '/base\/strings\/string_number_conversions.h/d' "$file"
            echo "Removed 'base/strings/string_number_conversions.h' from $file"
        fi
    done
}

add_header_if_needed() {
    files=$(git grep -lE "base::NumberToString|base::StringToInt|base::StringToUint|base::StringToSizeT|base::StringToDouble|base::HexEncode|base::AppendHexEncodedByte|base::HexStringTo")
    for file in $files; do
        ../tools/add_header.py --header '"base/strings/string_number_conversions.h"' "$file"
    done
}

remove_header_if_unused
add_header_if_needed
```

Resolves https://github.com/brave/brave-browser/issues/46382
2025-05-28 21:12:41 +01:00
Artem Samoilenko 8ca6a516b6 [cr137] [Android] Clean up UPM migration warning flag in activation algorithm
Chromium change:
https://chromium.googlesource.com/chromium/src/+/fc7e718fc09288206603f0743497cc70585a677e

[passwords] Clean up UPM migration warning flag in activation algorithm

kUnifiedPasswordManagerLocalPasswordsMigrationWarning was *disabled* by
default in M132 (https://crrev.com/c/5928711, http://cl/686529557). It
can be cleaned up now.

Bug: 413696987
2025-05-13 15:53:24 -04:00
AlexeyBarabash 7ec2445eed [cr136][Android] New arg util_bridge at SetUsesSplitStoresAndUPMForLocal
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2c75e2c2eb925ce0e5f2c7b59eb18cd5442f381c

	[UPMLoginDbSunset] Disable the old UPM activation algorithm

	With the login db deprecation, automatic migrations to UPM no longer
	happen. Instead the unmigrated passwords are automatically saved to a
	CSV that the user can download.

	Instead of the previous algorithm, UPM activation will be determined by
	checking that the correct version of GMS Core is installed and that no
	unmigrated passwords remain.

	In order to ensure metrics continuity, PasswordManager.LocalUpmActivated
	and PasswordManager.LocalUpmActivationStatus will still be recorded,
	but separately from the activation algorithm.

	Bug: 378652664
	Change-Id: I669c1dc9551daee18d1ee95f81887e178948a706
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6377026
2025-04-16 09:30:31 +01:00
Artem Samoilenko 16283be260 [Android] Clean up ClearLoginDatabaseForAllMigratedUPMUsers flag
Chromium change:
https://chromium.googlesource.com/chromium/src/+/2bd4e38dc9ed39d922061a54b06d586528f33f7e

[UPMLoginDbSunset] Clean up ClearLoginDatabaseForAllMigratedUPMUsers

.. after launch. This was enabled by default in crrev.com/c/5975566.

Bug: 381113374
2025-01-27 09:41:49 -05:00
AlexeyBarabash 418c83a516 [Android][Sync] Sync passwords from Android to Desktop (#27271)
* [Android][Sync] Sync passwords from Android to Desktop; fixes brave/brave-browser#43303
2025-01-25 14:24:33 +02:00
AlexeyBarabash 77ee2c01e3 [Android] Prevent wiping passwords on cr132 (#27191)
* [Android] Prevent wiping passwords on cr132; fixes brave/brave-browser#43171

Related Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/9dd58ffaeed73e9e1f9594e8a7f36dd0d5add9ba

	[UPMClearMigratedData] Enable feature by default

	And correct some outdated tests.

	Bug: 350509489
	Change-Id: I148ddd636c5421bb01345d53bb6b32b557066ba5
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5975566

	Committed on 2024-10-30 4:46 PM

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

	[UPMLoginDbSunset] Clean up ClearLoginDatabaseForAllMigratedUPMUsers

	.. after launch. This was enabled by default in crrev.com/c/5975566.

	Bug: 381113374
	Change-Id: I606f036fd2d090af1aee7a2715911cc04926ca74
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054617

	Committed on 2024-12-03 6:55 PM
2025-01-14 17:16:24 +02:00
Aleksei Khoroshilov 6a75a934b6 Prevent external favicons fetch on password manager page. (#27066)
* Prevent external favicons fetch on password manager page.

* Add test.
2024-12-20 15:56:31 +01:00