Use the sync account for invalidations.
Allow Sync to directly access the ProfileIdentityProvider so it can
change the account used for invalidations.
This way, when we enable Sync for DICe signed-in accounts,
invalidations will be using the right account.
Bug: 879455
[email protected]
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ibaecce6f46a01201fdaaf29ddec6e4ca24b06d38
Reviewed-on: https://chromium-review.googlesource.com/1164954
Commit-Queue: Florian Uunk <[email protected]>
Reviewed-by: Pavel Yatsuk <[email protected]>
Reviewed-by: Kush Sinha <[email protected]>
Reviewed-by: Mike Dougherty <[email protected]>
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Marc Treib <[email protected]>
Reviewed-by: Sergey Poromov <[email protected]>
Reviewed-by: Tatiana Gornak <[email protected]>
Cr-Commit-Position: refs/heads/master@{#587983}
diff --git a/components/browser_sync/profile_sync_test_util.cc b/components/browser_sync/profile_sync_test_util.cc
index aafe0c0..7babee3 100644
--- a/components/browser_sync/profile_sync_test_util.cc
+++ b/components/browser_sync/profile_sync_test_util.cc
@@ -270,6 +270,8 @@
account_tracker_.Initialize(&pref_service_, base::FilePath());
signin_manager_.Initialize(&pref_service_);
local_session_event_router_ = std::make_unique<DummyRouter>();
+ identity_provider_ = std::make_unique<invalidation::ProfileIdentityProvider>(
+ identity_manager());
ON_CALL(sync_sessions_client_, GetLocalSessionEventRouter())
.WillByDefault(testing::Return(local_session_event_router_.get()));
}
@@ -286,6 +288,7 @@
init_params.identity_manager = identity_manager();
init_params.signin_scoped_device_id_callback =
base::BindRepeating([]() { return std::string(); });
+ init_params.invalidations_identity_provider = identity_provider_.get();
init_params.network_time_update_callback = base::DoNothing();
init_params.url_loader_factory =
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(