Commit ba172b7b authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Remove SyncService::RequestStart

It has been replaced by SyncUserSettings::SetSyncRequested(true).
Note that *Profile*SyncService::RequestStart still exists for now
(it's used by SyncUserSettings). This will be changed in a later CL.

Bug: 884159
Change-Id: Ie96e6a999ae6060fd3bbe444e4471ba9327edef8
Reviewed-on: https://chromium-review.googlesource.com/c/1350907Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611609}
parent a6aabbdc
......@@ -150,7 +150,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientStandaloneTransportSyncTest,
// Turn off Sync-the-feature by user choice. The machinery should start up
// again in transport-only mode.
GetSyncService(0)->RequestStop(syncer::SyncService::KEEP_DATA);
GetSyncService(0)->GetUserSettings()->SetSyncRequested(false);
EXPECT_TRUE(GetClient(0)->AwaitSyncSetupCompletion(
/*skip_passphrase_verification=*/false));
......@@ -165,7 +165,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientStandaloneTransportSyncTest,
EXPECT_TRUE(bad_types.Empty()) << syncer::ModelTypeSetToString(bad_types);
// Finally, turn Sync-the-feature on again.
GetSyncService(0)->RequestStart();
GetSyncService(0)->GetUserSettings()->SetSyncRequested(true);
EXPECT_TRUE(GetClient(0)->AwaitSyncSetupCompletion(
/*skip_passphrase_verification=*/false));
EXPECT_EQ(syncer::SyncService::TransportState::ACTIVE,
......
......@@ -230,7 +230,7 @@ class ProfileSyncService : public syncer::SyncService,
void TriggerRefresh(const syncer::ModelTypeSet& types) override;
void OnDataTypeRequestsSyncStartup(syncer::ModelType type) override;
void RequestStop(SyncStopDataFate data_fate) override;
void RequestStart() override;
virtual void RequestStart(); // Virtual for testing.
syncer::ModelTypeSet GetActiveDataTypes() const override;
void AddObserver(syncer::SyncServiceObserver* observer) override;
void RemoveObserver(syncer::SyncServiceObserver* observer) override;
......
......@@ -69,8 +69,6 @@ void FakeSyncService::OnDataTypeRequestsSyncStartup(ModelType type) {}
void FakeSyncService::RequestStop(SyncService::SyncStopDataFate data_fate) {}
void FakeSyncService::RequestStart() {}
ModelTypeSet FakeSyncService::GetPreferredDataTypes() const {
return ModelTypeSet();
}
......
......@@ -39,7 +39,6 @@ class FakeSyncService : public SyncService {
bool HasObserver(const SyncServiceObserver* observer) const override;
void OnDataTypeRequestsSyncStartup(ModelType type) override;
void RequestStop(SyncService::SyncStopDataFate data_fate) override;
void RequestStart() override;
ModelTypeSet GetPreferredDataTypes() const override;
void OnUserChoseDatatypes(bool sync_everything,
ModelTypeSet chosen_types) override;
......
......@@ -85,7 +85,7 @@ class SyncService : public DataTypeEncryptionHandler, public KeyedService {
// yet. Note that during subsequent browser startups, Sync starts
// automatically, i.e. no prod is necessary, but during the first start Sync
// does need a kick. This usually happens via starting (not finishing!) the
// initial setup, or via an explicit call to RequestStart.
// initial setup, or via a call to SyncUserSettings::SetSyncRequested.
// TODO(crbug.com/839834): Check whether this state is necessary, or if Sync
// can just always start up if all conditions are fulfilled (that's what
// happens in practice anyway).
......@@ -266,12 +266,6 @@ class SyncService : public DataTypeEncryptionHandler, public KeyedService {
// ACTIONS / STATE CHANGE REQUESTS
//////////////////////////////////////////////////////////////////////////////
// The user requests that sync start. This only actually starts sync if
// IsSyncAllowed is true and the user is signed in. Once sync starts,
// other things such as IsFirstSetupComplete being false can still prevent
// it from moving into the "active" state.
virtual void RequestStart() = 0;
// Stops sync at the user's request. |data_fate| controls whether the sync
// engine should clear its data directory when it shuts down. Generally
// KEEP_DATA is used when the user just stops sync, and CLEAR_DATA is used
......
......@@ -152,8 +152,6 @@ ModelTypeSet TestSyncService::GetActiveDataTypes() const {
return active_data_types_;
}
void TestSyncService::RequestStart() {}
void TestSyncService::RequestStop(SyncService::SyncStopDataFate data_fate) {}
void TestSyncService::OnDataTypeRequestsSyncStartup(ModelType type) {}
......
......@@ -61,7 +61,6 @@ class TestSyncService : public SyncService {
ModelTypeSet GetPreferredDataTypes() const override;
ModelTypeSet GetActiveDataTypes() const override;
void RequestStart() override;
void RequestStop(SyncStopDataFate data_fate) override;
void OnDataTypeRequestsSyncStartup(ModelType type) override;
void OnUserChoseDatatypes(bool sync_everything,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment