Skip to content

Commit

Permalink
[sync] Mark GetSyncablePrefsDatabase() as pure virtual
Browse files Browse the repository at this point in the history
This CL wraps up a TODO to mark
PrefModelAssociatorClient::GetSyncablePrefsDatabase() as pure virtual
since all implementations have implemented it.

Bug: 1401271
Change-Id: I0f7538d508e88b3de4cff7055af3f3232fb3fb91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4324042
Commit-Queue: Ankush Singh <ankushkush@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1116296}
  • Loading branch information
Ankush Singh authored and Chromium LUCI CQ committed Mar 13, 2023
1 parent 6138706 commit 680e063
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
21 changes: 0 additions & 21 deletions components/sync_preferences/pref_model_associator_client.cc
Expand Up @@ -3,24 +3,3 @@
// found in the LICENSE file.

#include "components/sync_preferences/pref_model_associator_client.h"
#include "components/sync_preferences/syncable_prefs_database.h"

namespace sync_preferences {
namespace {
// TODO(crbug.com/1401271): Remove this class once GetSyncablePrefsDatabase()
// is marked as pure virtual.
class DummySyncablePrefsDatabase : public SyncablePrefsDatabase {
public:
bool IsPreferenceSyncable(const std::string& /*pref_name*/) const override {
return true;
}
};
} // namespace

const SyncablePrefsDatabase&
PrefModelAssociatorClient::GetSyncablePrefsDatabase() const {
static const DummySyncablePrefsDatabase syncable_prefs_database;
return syncable_prefs_database;
}

} // namespace sync_preferences
4 changes: 1 addition & 3 deletions components/sync_preferences/pref_model_associator_client.h
Expand Up @@ -43,9 +43,7 @@ class PrefModelAssociatorClient {

// Returns a pointer to the instance of SyncablePrefsDatabase. This should
// define the list of syncable preferences.
// TODO(crbug.com/1401271): Mark this method as pure virtual once
// platform-specific implementations are complete.
virtual const SyncablePrefsDatabase& GetSyncablePrefsDatabase() const;
virtual const SyncablePrefsDatabase& GetSyncablePrefsDatabase() const = 0;

protected:
PrefModelAssociatorClient() {}
Expand Down

0 comments on commit 680e063

Please sign in to comment.