Commit f2bff73f authored by Mohamed Amir Yosef's avatar Mohamed Amir Yosef Committed by Commit Bot

[Sync::USS] Add NOTIMPLEMENTED methods to PasswordStoreX

Recently introduced methods in PasswordStoreSync interface are
implemented in PasswordStoreDefault.
However, this implementation isn't compatible with PasswordStoreX.

This overrides such methods in PasswordStoreX with a NOTIMPLEMENTED()
implementation to make sure they aren't called by mistake.

This should be OK because those methods are only used in Sync code base
which doesn't use PasswordStoreX.
In addition, PasswordStoreX will be deprecated.

Similarly implementation in used in TestPasswordStore because it
doesn't support primary key for forms. This is also OK because  Sync
unittest is using a mock PasswordSyncStore rather than
a TestPasswordStore.

Bug: 902349
Change-Id: Id795f3f6ae6b0efa75bbb22dc1675f3c12210692
Reviewed-on: https://chromium-review.googlesource.com/c/1429964
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626067}
parent 4493758b
...@@ -545,3 +545,20 @@ void PasswordStoreX::ShutdownOnUIThread() { ...@@ -545,3 +545,20 @@ void PasswordStoreX::ShutdownOnUIThread() {
migration_step_pref_.Destroy(); migration_step_pref_.Destroy();
PasswordStoreDefault::ShutdownOnUIThread(); PasswordStoreDefault::ShutdownOnUIThread();
} }
bool PasswordStoreX::ReadAllLogins(
password_manager::PrimaryKeyToFormMap* key_to_form_map) {
NOTIMPLEMENTED();
return false;
}
PasswordStoreChangeList PasswordStoreX::RemoveLoginByPrimaryKeySync(
int primary_key) {
NOTIMPLEMENTED();
return PasswordStoreChangeList();
}
syncer::SyncMetadataStore* PasswordStoreX::GetMetadataStore() {
NOTIMPLEMENTED();
return nullptr;
}
...@@ -137,6 +137,14 @@ class PasswordStoreX : public password_manager::PasswordStoreDefault { ...@@ -137,6 +137,14 @@ class PasswordStoreX : public password_manager::PasswordStoreDefault {
// RefcountedKeyedService: // RefcountedKeyedService:
void ShutdownOnUIThread() override; void ShutdownOnUIThread() override;
protected:
// Implements PasswordStoreSync interface.
bool ReadAllLogins(
password_manager::PrimaryKeyToFormMap* key_to_form_map) override;
password_manager::PasswordStoreChangeList RemoveLoginByPrimaryKeySync(
int primary_key) override;
syncer::SyncMetadataStore* GetMetadataStore() override;
private: private:
friend class PasswordStoreXTest; friend class PasswordStoreXTest;
......
...@@ -232,6 +232,7 @@ PasswordStoreChangeList TestPasswordStore::RemoveLoginByPrimaryKeySync( ...@@ -232,6 +232,7 @@ PasswordStoreChangeList TestPasswordStore::RemoveLoginByPrimaryKeySync(
} }
syncer::SyncMetadataStore* TestPasswordStore::GetMetadataStore() { syncer::SyncMetadataStore* TestPasswordStore::GetMetadataStore() {
NOTIMPLEMENTED();
return nullptr; return nullptr;
} }
......
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