0
Commit Graph

889 Commits

Author SHA1 Message Date
Mohamed Amir Yosef
9e2e51b7ab Reland "Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface""
This is a reland of 90b828a389

Reason to reland: causes tree closure.

Original change's description:
> Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
>
> This is a reland of 575271e697
>
> Original change's description:
> > [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
> >
> > This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> > MockPasswordStoreInterface instead of MockPasswordStore.
> >
> > This requires:
> > 1- Introducing new method in the PasswordStoreFactory to  create
> > the interface.
> > 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> > of PasswordStore.
> >
> > Bug: 1218413
> > Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> > Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> > Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> > Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#907092}
>
> Bug: 1218413
> Change-Id: I8e51c3d30c11a264d7321f055f25b6875288bff6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064610
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907536}


Bug: 1218413
Change-Id: I6d4f04243d19763c526d29102a0aae7bd3df59d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3065528
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Maksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/master@{#907891}
2021-08-03 09:19:32 +00:00
Maksim Moskvitin
030e1a55cc Revert "Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface""
This reverts commit 90b828a389.

Reason for revert: causes tests failure on Linux CFI builder (see crbug.com/1235972).

Original change's description:
> Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
>
> This is a reland of 575271e697
>
> Original change's description:
> > [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
> >
> > This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> > MockPasswordStoreInterface instead of MockPasswordStore.
> >
> > This requires:
> > 1- Introducing new method in the PasswordStoreFactory to  create
> > the interface.
> > 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> > of PasswordStore.
> >
> > Bug: 1218413
> > Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> > Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> > Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> > Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#907092}
>
> Bug: 1218413
> Change-Id: I8e51c3d30c11a264d7321f055f25b6875288bff6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064610
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907536}

Bug: 1218413
Change-Id: If211b5516bdf4c10b349b2faf7cec27bdd321de9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3065466
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Owners-Override: Maksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/master@{#907886}
2021-08-03 08:46:22 +00:00
Mohamed Amir Yosef
90b828a389 Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
This is a reland of 575271e697

Original change's description:
> [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
>
> This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> MockPasswordStoreInterface instead of MockPasswordStore.
>
> This requires:
> 1- Introducing new method in the PasswordStoreFactory to  create
> the interface.
> 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> of PasswordStore.
>
> Bug: 1218413
> Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907092}

Bug: 1218413
Change-Id: I8e51c3d30c11a264d7321f055f25b6875288bff6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064610
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907536}
2021-08-02 14:15:00 +00:00
Nina Satragno
b23e28986c Revert "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
This reverts commit 575271e697.

Reason for revert: CL sus crbug.com/1234803

Now that
https://chromium-review.googlesource.com/c/chromium/src/+/3062942
has been reverted, landing this patch should not break the build.

This was originally https://crrev.com/c/3064000 but apparently
the rubber stamp bot doesn't work on relands.

Original change's description:
> [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
>
> This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> MockPasswordStoreInterface instead of MockPasswordStore.
>
> This requires:
> 1- Introducing new method in the PasswordStoreFactory to  create
> the interface.
> 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> of PasswordStore.
>
> Bug: 1218413
> Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907092}

Bug: 1218413, 1234803
Change-Id: Ic31a5426e1d4b32f52206556acee5d165ea73b27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064480
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Owners-Override: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907256}
2021-07-30 21:10:25 +00:00
Markus Heintz
43208368ba Reland "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
This reverts commit 59284f9ea8.

Reason for revert: seems to break the build

Original change's description:
> Revert "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
>
> This reverts commit 575271e697.
>
> Reason for revert: CL sus crbug.com/1234803
>
> Bug: 1234803
>
> Original change's description:
> > [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
> >
> > This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> > MockPasswordStoreInterface instead of MockPasswordStore.
> >
> > This requires:
> > 1- Introducing new method in the PasswordStoreFactory to  create
> > the interface.
> > 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> > of PasswordStore.
> >
> > Bug: 1218413
> > Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> > Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> > Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> > Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#907092}
>
> Bug: 1218413
> Change-Id: Idc8dabf52349517c79a4d46dfcac74a591f4054d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3063282
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Nina Satragno <nsatragno@chromium.org>
> Owners-Override: Nina Satragno <nsatragno@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907143}

Bug: 1234803
Bug: 1218413
Change-Id: I2581e80ee82aefee8c48f5660f3a68887d3fef79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3062850
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Markus Heintz <markusheintz@chromium.org>
Owners-Override: Markus Heintz <markusheintz@chromium.org>
Auto-Submit: Markus Heintz <markusheintz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907160}
2021-07-30 17:52:43 +00:00
Nina Satragno
59284f9ea8 Revert "[Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface"
This reverts commit 575271e697.

Reason for revert: CL sus crbug.com/1234803

Bug: 1234803

Original change's description:
> [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
>
> This CL switches ChromeBrowsingDataRemoverDelegateTest to use
> MockPasswordStoreInterface instead of MockPasswordStore.
>
> This requires:
> 1- Introducing new method in the PasswordStoreFactory to  create
> the interface.
> 2- Updating bunch of Sync code to use PasswordStoreInterface instead
> of PasswordStore.
>
> Bug: 1218413
> Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#907092}

Bug: 1218413
Change-Id: Idc8dabf52349517c79a4d46dfcac74a591f4054d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3063282
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Owners-Override: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907143}
2021-07-30 15:57:54 +00:00
Mohamed Amir Yosef
575271e697 [Passwords] ChromeBrowsingDataRemoverDelegateTest uses PwdStoreInterface
This CL switches ChromeBrowsingDataRemoverDelegateTest to use
MockPasswordStoreInterface instead of MockPasswordStore.

This requires:
1- Introducing new method in the PasswordStoreFactory to  create
the interface.
2- Updating bunch of Sync code to use PasswordStoreInterface instead
of PasswordStore.

Bug: 1218413
Change-Id: I9ea6ef2b488b122b07b50bbbc5dc629e34be960f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3031068
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907092}
2021-07-30 12:23:23 +00:00
Rushan Suleymanov
84323d05a9 [Sync] Set single_client flag based on committed data types
This CL extends single_client optimization flag (used for invalidations)
to consider current device as single if other devices are not interested
in the committed data types.

Bug: 1228714
Change-Id: I78782d75b208ffcc51ea8599347c4ac96a75038d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3024128
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#901937}
2021-07-15 14:23:49 +00:00
Mikel Astiz
89473c4446 [sync] Move SyncTransportDataPrefs to dedicated file
The gets moved code as-is (except for banned functions affecting
base::Time), burying these internal fields deeper into sync code,
and away from the more exposed SyncPrefs class.

No-Presubmit: true
Change-Id: I4a22dbefb23decbc5bad19047c534c55697fc7c7
Fixed: 938894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015513
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900921}
2021-07-13 09:46:12 +00:00
avynn
d04702708c Added local storage layer for the DeskModel
This patch adds a local storage layer for the
DeskTemplate feature for CrOS.

Bug: 1177413
Change-Id: I52c8fd9fcc32776a2315ba86402ddd807b5cf128
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2946308
Commit-Queue: Avynn Donaghe <avynn@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898324}
2021-07-02 20:44:06 +00:00
Yanzhu Du
0038eebe37 DeskSyncBridge implementation for Workspace Desk Sync model type
- Implements ModelTypeSyncBridge.
- Also implements the desk storage interface DeskModel.

Bug: 1177413
Change-Id: I58ada0ed8bb45131976faf75e1cce6700487160e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2985005
Commit-Queue: Yanzhu Du <yzd@google.com>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#897605}
2021-07-01 01:14:31 +00:00
Lei Zhang
a6fa14833a Swap from base/stl_util.h to cxx20_erase.h in components/.
base::Erase() and base::EraseIf() have been moved to
base/containers/cxx20_erase.h, so .cc files that use these functions,
but no other function from base/stl_util.h, can directly include
cxx20_erase.h and not stl_util.h.

Bug: 1211125
Change-Id: Ia8f213f1136ac4c5278cd096b1270002884b556d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2994779
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#897400}
2021-06-30 16:14:59 +00:00
Victor Hugo Vianna Silva
bdedada192 Remove plumbing of kSavingBrowserHistoryDisabled through c/sync/
Now that the same constant started being used everywhere in
crrev.com/c/2944930, the plumbing of the pref name through some sync
layers can be removed, instead referencing the constant directly where
it's needed.

Fixed: 1217127
Change-Id: I19a73c69f15e83572b6d8ad3de2a69567867c02a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2944890
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890509}
2021-06-08 23:50:00 +00:00
Marc Treib
8c8f4b3c99 Reland "Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor"
This reverts commit 92acf9abfc.

Reason for reland: The traffic increase from the original CL is fixed in
patch set 3 (while patch set 2 contains merge conflict fixes).

Original change's description:
> Revert "Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor"
>
> This reverts commit e60c93afaa.
>
> Reason for revert: Suspected of causing traffic increase, see crbug.com/1187914
>
> Original change's description:
> > Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor
> >
> > The param was used to initialize the downloaded_types_ member, but that
> > anyway got recomputed in ActivateDataTypes(), so the initial value had
> > no effect. This CL removes the param, and all the plumbing that was in
> > place for it.
> > Note that there was one test which used the initial_types param, with
> > the intention of marking these types as "already downloaded". The test
> > passes before as after this CL. Fixing the test so that it actually
> > tests what it claims to test is left as a followup.
> >
> > Bug: 1170318
> > Change-Id: I620d68f726b284ea1a5766dca46675aaba849216
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2647982
> > Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
> > Commit-Queue: Marc Treib <treib@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#847203}
>
> Bug: 1170318, 1187914
> Change-Id: I5f68012c6108c9952ef9f65f26a7ea086c9aec8c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2763905
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Commit-Queue: Marc Treib <treib@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#863315}

Bug: 1170318
Change-Id: I54c2808c9eabbc3a6f9d2b8c7634a646a4217959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2919842
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#887223}
2021-05-27 17:53:47 +00:00
Marc Treib
18d1268b31 Migrate sync presubmit files to Python3
This CL trivially converts the following presubmits to Python3:
components/sync_sessions/PRESUBMIT.py
components/sync_bookmarks/PRESUBMIT.py
components/sync/PRESUBMIT.py
components/browser_sync/PRESUBMIT.py

One file (components/sync/driver/resources/PRESUBMIT.py) is not trivial
to convert (it has dependencies that aren't Python3-compatible yet) and
is still left on Python2 for now (tracked in crbug.com/1212015).

Bug: 1212017, 1212016, 1212014, 1211999
Change-Id: I21dedf9dbdfdbcb8ea85b3372f09920d5183ed40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2917085
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Auto-Submit: Marc Treib <treib@chromium.org>
Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/master@{#886677}
2021-05-26 11:33:12 +00:00
Anton Bikineev
1156b5f891 components: Replace base::Optional and friends with absl counterparts
This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
  ->
  include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional

Bug: 1202909
Change-Id: If697b7bf69b199c1796f873eedca3359cdb48c64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897151
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Owners-Override: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883296}
2021-05-15 22:35:36 +00:00
Mikel Astiz
c959c65d19 [sync] Move encryption bootstrap token to SyncPrefs
No behavioral changes: this patch refactors the exposure of a
preference from one wrapping class (SyncTransportDataPrefs) to another
(SyncPrefs), and refactors the plumbing for the values feeding from
and into the sync engine.

Context: the encryption bootstrap token (not to be mixed up with the
keystore equivalent) represents a user-entered passphrase. Its lifetime
is longer than the usual metadata "cache" that the sync engine maintains
internally, encapsulated in SyncTransportDataPrefs, because clearing it
may require that the user enters the passphrase again.

Prior to this patch, this field was the only exception in
SyncTransportDataPrefs, with a longer lifetime than the rest. In this
patch, this special-handling in SyncTransportDataPrefs is deleted and
instead the encryption bootstrap token is moved to SyncPrefs, where
other user-controlled settings live.

To achieve this, the plumbing for this token needs to diverge from the
keystore equivalent, and is now implemented via a newly-introduced
function in SyncServiceCrypto::Delegate (as well as a new field in
SyncEngine::InitParams). This asymmetry is only temporary, because there
are plans to completely remove the keystore bootstrap token (which,
after all, can be redownloaded from the server without user action).

With this change, there are no remaining direct dependencies from
ProfileSyncService to SyncTransportDataPrefs, making it a sync-internal
concept hidden under interface SyncEngine. Therefore, the member field
is deleted and the unit-tests simplified.

Change-Id: I7efa832500248183e236a7ef05b451d53dce14ee
Bug: 938894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659212
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#878490}
2021-05-03 18:49:15 +00:00
Lei Zhang
ca268b39b5 Do IWYU for base/metrics/field_trial_params.h.
Include it directly, rather than relying on other headers to include it.
Fix minor style guide violations along the way.

Change-Id: I7d89b4708fbd34bddb25be9157c663104bb74d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2850480
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#876304}
2021-04-26 21:25:42 +00:00
Hans Wennborg
cf86a6f2b7 Don't include sync.pb.h in components/sync_device_info/device_info.h
This was found through include graph analysis, which suggests that
this include edge adds ca 1GB of data to the chrome build target.

Removing the include shaves 7 CPU minutes off a local chrome build.

Bug: 242216
Change-Id: I565b81b6c09a865bc904208888ee3f97588f4ab1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2845302
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875167}
2021-04-22 15:18:06 +00:00
Hirthanan Subenderan
e6657f7cbd Implement codepaths to add full_hardware_class proto field.
Launch covers client side changes needed to add full hardware class
to ChromeSync, in an effort to improve the accuracy of stored device
models.

By tracking the full hardware class of a device, more accurate chromeos device
segmentation of DAU can be accomplished. This can be used
to determine information about how hardware components of a device
relate to usage patterns, or issues commonly occurring across them.

Added unittests to validate correctness.

Bug: 1188978
Change-Id: Ie33b5737ebf5f53e5ba54db2ee85887dcb2c7046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2800501
Auto-Submit: Hirthanan Subenderan <hirthanan@google.com>
Commit-Queue: Hirthanan Subenderan <hirthanan@google.com>
Commit-Queue: Richard Knoll <knollr@chromium.org>
Reviewed-by: Richard Knoll <knollr@chromium.org>
Reviewed-by: Rushan Suleymanov <rushans@google.com>
Reviewed-by: Travis Skare <skare@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#873253}
2021-04-16 10:43:12 +00:00
Adam Langley
1b4e4a6727 webauthn: add Sync infrastructure.
This change adds the Sync plumbing to allow Android devices to advertise
caBLEv2 data so that other instances of Chrome can connect to them for
security key operations.

BUG=1002262

Change-Id: I9aec74903e7099b210f4bb6df2f54a6415969d97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2728655
Reviewed-by: Travis Skare <skare@chromium.org>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Reviewed-by: Alex Chau <alexchau@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#866837}
2021-03-25 23:07:39 +00:00
Marc Treib
92acf9abfc Revert "Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor"
This reverts commit e60c93afaa.

Reason for revert: Suspected of causing traffic increase, see crbug.com/1187914

Original change's description:
> Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor
>
> The param was used to initialize the downloaded_types_ member, but that
> anyway got recomputed in ActivateDataTypes(), so the initial value had
> no effect. This CL removes the param, and all the plumbing that was in
> place for it.
> Note that there was one test which used the initial_types param, with
> the intention of marking these types as "already downloaded". The test
> passes before as after this CL. Fixing the test so that it actually
> tests what it claims to test is left as a followup.
>
> Bug: 1170318
> Change-Id: I620d68f726b284ea1a5766dca46675aaba849216
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2647982
> Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
> Commit-Queue: Marc Treib <treib@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#847203}

Bug: 1170318, 1187914
Change-Id: I5f68012c6108c9952ef9f65f26a7ea086c9aec8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2763905
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863315}
2021-03-16 16:26:45 +00:00
Jan Wilken Dörrie
09a4396a44 [LSC] Remove base/strings/string16.h #includes
This change removes #includes of base/strings/string16.h from the
codebase.

Bug: 1184339
Change-Id: I3b29dd94c6955d01029d24f88177b755863c865d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2756167
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862683}
2021-03-14 19:20:08 +00:00
Jan Wilken Dörrie
fa241bad9f [LSC] Replace base::string16 with std::u16string in //components
This change replaces base::string16 with std::u16string in //components.

Reproduction steps:
$ git grep -lw 'base::string16' components | \
      xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format

Bug: 1184339
Change-Id: Ifd99bc43ca04810a480466369b5cd6680bbe89ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752068
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862035}
2021-03-11 17:57:01 +00:00
Jan Wilken Dörrie
ad587c3edb [LSC] Add #include <string> to prepare for removal of base::string16
This change adds #include <string> to files currently including
"base/strings/string16.h". This prepares these files for the planned
removal of the base::string16 alias.

In order to adhere to the style guide [1] the following logic was
performed:

* Insert into an existing block of C++ STL includes, if possible
* Else insert `#include <string>` followed by a newline before the first
  #include "some_header.h" line that is not referring to a matching header
  (only relevant for implementation and test files)

[1] https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Bug: 1184339
Change-Id: I96660fec3fff0192d53e9728bbbae86228a52c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2749296
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861966}
2021-03-11 14:09:27 +00:00
Jan Krcal
d91d25a495 [NewProfileCheck] VLOGs to debug on managed devices
This CL replaces DVLOG with VLOG to be able to debug an issue on a
managed device in Canary.

Bug: 1173454
Change-Id: I61384284a509f46404b37dbf2f6c88704faced40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2678684
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Commit-Queue: Yann Dago <ydago@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: Yann Dago <ydago@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851729}
2021-02-08 16:15:46 +00:00
Henrique Ferreiro
adddf4b16d Move //chromeos/constants to //ash/constants
Moving the actual target was the only thing left to do.

This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.

No-Presubmit: true
Bug: 1164001
Change-Id: I7b9dfc39c236e41d28b27def6a14910dbe8f3834
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2666133
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: James Cook <jamescook@chromium.org>
Owners-Override: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851442}
2021-02-06 07:13:56 +00:00
Mikel Astiz
678d774193 [sync] Move SyncTransportDataPrefs clearing away from ProfileSyncService
Instead of directly clearing the prefs from ProfileSyncService, the
APIs in SyncEngine and SyncApiComponentFactory are adopted, the latter
with some refactoring involved.

Change-Id: I08fb5db6ae31c5454c16be17f57911a075ed967d
Bug: 938894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657826
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850868}
2021-02-05 00:42:21 +00:00
Henrique Ferreiro
e8c9449bea Move chromeos_features.* to ash/constants/
This is a precursor CL before migrating //chromeos/constants to //ash.

This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE/edit

No-Presubmit: True
Bug: 1164001
Change-Id: I20e5ac8f9e64bf7455090880ea3d65846dd15614
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2667204
Owners-Override: James Cook <jamescook@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850377}
2021-02-04 00:52:40 +00:00
Victor Hugo Vianna Silva
d00f800f7d [Sync Model/Engine split] Merge {model,engine}_impl with {model,engine}
The distinction between the impl and non-impl directories has become
unclear over time, as well as the dependencies between them. This CL
merges them. This will allow us to create separate build targets for
engine/ and model/ (model/ depends on engine/). Subdirectories are
merged correspondingly, e.g. engine_impl/cycle/ is merged with
engine/cycle/.

Orthogonal to this, we remove 1 unnecessary engine/ dependency from
components/password_manager/core/browser/DEPS, and make some net/
dependencies more specific in sync/ DEPS.

TBR=sky@chromium.org

Bug: 947443
Change-Id: Iedc11931d1c1d2c126186679a906b88984a8d27d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659120
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849112}
2021-02-01 15:18:45 +00:00
Mikel Astiz
dcdd123f16 [sync] Move SyncTransportDataPrefs closer to SyncEngineImpl
These preferences represent the internal bookkeeping data that the
implementation of the sync engine owns (SyncEngineImpl, backend, etc.),
to be persisted in prefs.

This patch moves the resposibility for dealing with prefs (reads and
writes) from ProfileSyncService to SyncEngineImpl, simplifying some of
of the APIs in between and adhering to more strict layering principles.

Instead of moving all functionality in a single patch, the most relevant
parts are moved, but TODOs are added to move the remaining parts and
therefore completely avoid the dependency from ProfileSyncService to
SyncTransportDataPrefs. Meanwhile, *both* ProfileSyncService and
SyncEngineImpl interact with these preferences, which is obviously not
great.

Bug: 938894
Change-Id: Id35f38ef90d0b219ef5393c9e70e2d1f4c4b4cc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2652627
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848624}
2021-01-29 18:43:53 +00:00
Mikel Astiz
b3a2415d0a [sync] Split transport data away from SyncPrefs
Prior to this patch, SyncPrefs bundles two different types of
preferences: a) actual user-controlled preferences; b) internal
"bookkeeping" metadata that happens to be stored in preferences, also
referred to as local sync transport data.

In this patch, the latter are split into a new class,
SyncTransportDataPrefs. In order to keep the diff small, the class stays
in the same file for now, subject to be moved in follow-up patches.

Change-Id: Ieb2e8c3e26c6ab4e1e01f08854d581373907296e
Bug: 938894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2648483
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847596}
2021-01-27 13:44:37 +00:00
Marc Treib
e60c93afaa Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor
The param was used to initialize the downloaded_types_ member, but that
anyway got recomputed in ActivateDataTypes(), so the initial value had
no effect. This CL removes the param, and all the plumbing that was in
place for it.
Note that there was one test which used the initial_types param, with
the intention of marking these types as "already downloaded". The test
passes before as after this CL. Fixing the test so that it actually
tests what it claims to test is left as a followup.

Bug: 1170318
Change-Id: I620d68f726b284ea1a5766dca46675aaba849216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2647982
Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847203}
2021-01-26 17:10:16 +00:00
Rushan Suleymanov
db1d912ffe [Sync] Introduce an FCM token list as part of a commit message
The list can be used by the server to send invalidations to other
clients on commit request. The list contains all known FCM tokens from
all active devices known to the client via DeviceInfo data type.

A device is considered active if it sent DeviceInfo specifics within its
pulse time interval (with an additional margin interval).

The list might contain the FCM token of the local device to support
reflections. There is also a limit of the size of the list to restrict
the additional data in a commit request.

The empty list means that there is no known information about all other
clients and the server should decide itself where to send invalidations.
To distinguish the case when there is the only client (which doesn't
expect a reflection invalidation), the client should provide the single
client flag.

Bug: 1164849
Change-Id: I4770091d8e5a577ad9581f899676feeaf381ba97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2620560
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Cr-Commit-Position: refs/heads/master@{#843003}
2021-01-13 14:32:35 +00:00
Victor Hugo Vianna Silva
68cf1e3075 [sync] Clean-up IsWebSignout() calls post StopSyncInPausedState launch
1) Before this CL, some ModelTypeControllers called IsWebSignout() in
their GetPreconditionState() implementation to make sure the data type
was stopped upon web sign-out. This is no longer needed following the
StopSyncInPausedState launch (crbug.com/906995), so this CL removes such
checks.
If GetPreconditionState() makes no other checks, the controller also no
longer needs to observe the SyncService. Note this isn't true for
controllers that check for persistent auth errors, since that concept is
more general than web sign-out. For those, only TODOs/includes are
removed.

2) The CL also addresses one IsWebSignout() TODO in PersonalDataManager.
Contrary to what the TODO implies, just removing the call isn't enough.
IsSyncFeatureEnabled() returns true in the sync-paused state, so the
check for TransportState::PAUSED must be moved up.

3) Finally, the CL updates the last TODO pointing to crbug.com/906995
to point to a newly filed bug. This concludes the post-launch cleanup
for StopSyncInPausedState.

Bug: 1140447
Change-Id: I996a8871050f8f18e1509a5560ca0ccfc849f217
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505772
Reviewed-by: sebsg <sebsg@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#836062}
2020-12-11 11:04:45 +00:00
Yuta Hijikata
62dbeaf1bd LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_CHROMEOS_ASH)
The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with
is_chromeos_ash with some special cases (For those cases please
refer to http://go/lacros-macros).

The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.

Bug: 1052397
Change-Id: I67ce28e4f8863d9247e57e03b771fb3f6bf7f5d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2565042
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835545}
2020-12-10 04:15:51 +00:00
Norman Rosas
bc450e0dbd Added DIR_METADATA files to a batch of subfolders in //components/a… and //components/b... , also removed duplicated metadata from OWNERS files
Bug: 1113033
Change-Id: I167e955eb480a5ef21bd482f588640dd5ad1323c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560063
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Norman Rosas <normando@google.com>
Cr-Commit-Position: refs/heads/master@{#831914}
2020-11-30 18:41:28 +00:00
Rushan Suleymanov
22f80fd2c9 [Sync] Introduce the flag indicating that there are no other clients
Clients will send the flag which will indicate that the client is not
aware of any other clients. This is useful to prevent trying to send
invalidations from the server.

The single client flag is calculated based on known device infos.
Devices which don't have recent enough updates are considered
non-active.

Bug: 1145942
Change-Id: Ia24cb880e361b65796ea8c516ef38c1bfed58b12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533775
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826891}
2020-11-12 18:58:08 +00:00
Victor Hugo Vianna Silva
b78f5f2f95 [sync] Extend send-tab-to-self ModelTypeControllers for transport mode
This CL extends the MTC of the SEND_TAB_TO_SELF data type to receive a
ModelTypeControllerDelegate for transport-only mode. A non-null
delegate is passed to the controller if and only if the existing
kSendTabToSelfWhenSignedIn feature toggle is enabled.

Bug: 956722
Change-Id: Ie14535d0e873cc8a3c8bcfedc611f8d8eb6abaa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517584
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: sebsg <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824025}
2020-11-04 17:10:32 +00:00
Nicolas Ouellet-Payeur
19ba8fcb54 [Sync] Fix a crash in StopSyncHelperOnModelThread()
This is a new crash with the DestroyProfileOnBrowserClose experiment
(go/destroy-profile-on-browser-close). The BookmarkSyncService uses a
ProxyModelTypeControllerDelegate, with the UI thread as the model
thread. This causes issues, where posted tasks run _after_ the
BookmarkSyncService gets deleted.

This patch switches it to a ForwardingModelTypeControllerDelegate,
so the tasks run synchronously instead of posting to the UI thread. This
fixes teardown order.

Bug: 1140232, 88586
Change-Id: I0802334ce3da56326c167f7951d512fe045ddece
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2487222
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820229}
2020-10-23 14:28:54 +00:00
Victor Hugo Vianna Silva
29c3019a63 [Sync] Fix race condition for Directory files deletion
ProfileSyncService has logic to delete the legacy Directory files on
shutdown if the sync engine doesn't exist (normally the engine would do
the deletion). One consequence of crrev.com/c/2461325 is that the engine
implementation and this deletion no longer have ordering guarantees. If
sync is immediately restarted, it's possible that a new engine will be
created before the deletion finishes, which is a race condition.

This CL fixes the issue by exposing a deletion method in
SyncApiComponentFactory (the class responsible by creating engines)
which is guaranteed to run sequentially with the implementation of any
engine it creates. As a bonus, this removes some assumptions made by
ProfileSyncService that the underlying SyncEngine is actually a
SyncEngineImpl.

Fixed: 1123881
Change-Id: I55528019863eeca9f90c09172c410a87f74e0bd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2476434
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817596}
2020-10-15 18:54:04 +00:00
Mikel Astiz
de2a09991f [sync] Remove GetSyncableServiceForType() from SyncClient
This historic mechanism to inject dependencies into ProfileSyncService
doesn't belong in SyncClient (dependencies to core sync logic / engine
itself), and it's questionable whether it should remain in this form in
BrowserSyncClient, where feature-specific dependencies are injected, and
where multiple similar approaches coexist.

Arguably, the most elegant and universal way to inject a dependency
to a sync controller is to have full access to the KeyedService that
owns the local model. Most controllers are simple and don't actually
need this: all they need is a SyncableService or
ModelTypeControllerDelegate. However, that introduces code
inconsistencies that can be confusing.

In this patch, the approach is unified for the remaining
SyncableService types, after migrating history delete directives and
preferences). The corresponding keyed services are directly injected via
BrowserSyncClient and hence SyncClient::GetSyncableServiceForType() can
be deleted.

Change-Id: I8e80482e8657624dc7c1e15b6bcf0409ae4d1336
Bug: 915154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463617
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816550}
2020-10-13 13:45:09 +00:00
Marc Treib
b9454e0419 Make HttpPostProviderInterface refcounted
This allows the corresponding factory to return refptrs instead of raw
pointers, and lets remove the explicit Destroy() method.
One downside is that now all implementations have to be refcounted, but
this only affects some test implementations.

One particular test implementation, TestHttpBridge[Factory], was unused
and is deleted.

Bug: 951350
Change-Id: I8c581136389e2ce470786dffefa3145e88c5d19c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466237
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#816494}
2020-10-13 09:31:07 +00:00
David Bienvenu
2984419b2e remove DISALLOW_COPY_AND_ASSIGN from components/*
A bit of cpp lint cleanup, no functional changes.

Bug: 1010217
Change-Id: I7b713e20ae81a896537f0683b1ba31a8465c9d5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2408179
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806772}
2020-09-14 22:20:21 +00:00
Siyu An
7e9c0c4ad4 [Autofill Offer] Introduce skeleton of autofill_wallet_offer_sync_bridge
Introduced the skeleton of the new autofill offer sync bridge.
Will add more to it in the following CLs.

The offer data and the wallet credit card data now will controlled by
the same toggle in the Chrome sync settings page. Therefore the sync
logic will be almost same. So reuse the current model type controller.

Bug: 1112095
Change-Id: I7464dde02b84f0a020f262c5453e8ac4a067edfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2365854
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Matthias Körber <koerber@google.com>
Commit-Queue: Siyu An <siyua@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800561}
2020-08-21 14:38:08 +00:00
Josip Sokcevic
8b6cc43b85 Use inclusive parameter names in PRESUBMIT.py
Bug: 1098562
Change-Id: I10e83b99a480d2d96b911e26b09e8db5d34a082e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333301
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795088}
2020-08-05 17:45:33 +00:00
Rushan Suleymanov
d5c5ef5a15 [Sync] Add sync invalidations factory
This CL introduces a factory for SyncInvalidationsService and wires it
to ProfileSyncService to add listener. The invalidations service is
added behind a feature toggle which is disabled by default.

Bug: 1082122
Change-Id: I94249979ae4fc17132670fba2d49a7ba50a56bc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2220029
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793132}
2020-07-30 13:07:24 +00:00
Marc Treib
8677956900 Clear passwords account store on startup, if opt-in is missing
This helps recover from cases where the account store should have been
cleared, but wasn't (e.g. badly-timed crash).

Bug: 1079297
Change-Id: I57e6a53c4de7807aba7346531c7b2056b5ac100f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292518
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789867}
2020-07-20 08:55:58 +00:00
Tanmoy Mollik
69a7114c34 Remove SyncErrorInfoBarAndroid flag from native code
This feature was launched to 100 percent stable. This cl removes the flag
from native side of the code.

Bug: 1096011
Change-Id: I119fcb5c224e665b589a40f11b1da4d342597c4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2266880
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783526}
2020-06-29 15:05:51 +00:00
Tanmoy Mollik
fbab616959 [Android] Enable SyncErrorInfoBarAndroid by default
This feature was rolled out to 1 percent stable. This cl enables it by
default in preparation for launching it to 100 percent stable

Bug: 1046765
Change-Id: I62e39fdd8b3a2646032c9816a266121b2aabe71a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241811
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782385}
2020-06-25 12:42:19 +00:00