Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: components/sync/driver/glue/sync_backend_host_impl_unittest.cc

Issue 2663783002: [Sync] Split encryption state and logic out of PSS and SBHI. (Closed)
Patch Set: Tweak comment. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.cc ('k') | components/sync/driver/sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/glue/sync_backend_host_impl_unittest.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl_unittest.cc b/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
index a96b4b2baa09ff3fcb713c048ac70e95063e0090..dc376d9f2c9fb7a361d983e48d83757cfdf5ea48 100644
--- a/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
@@ -141,6 +141,24 @@ class BackendSyncClient : public FakeSyncClient {
}
};
+class NullEncryptionObserver : public SyncEncryptionHandler::Observer {
+ public:
+ void OnPassphraseRequired(
+ PassphraseRequiredReason reason,
+ const sync_pb::EncryptedData& pending_keys) override {}
+ void OnPassphraseAccepted() override {}
+ void OnBootstrapTokenUpdated(const std::string& bootstrap_token,
+ BootstrapTokenType type) override {}
+ void OnEncryptedTypesChanged(ModelTypeSet encrypted_types,
+ bool encrypt_everything) override {}
+ void OnEncryptionComplete() override {}
+ void OnCryptographerStateChanged(Cryptographer* cryptographer) override {}
+ void OnPassphraseTypeChanged(PassphraseType type,
+ base::Time passphrase_time) override {}
+ void OnLocalSetPassphraseEncryption(
+ const SyncEncryptionHandler::NigoriState& nigori_state) override {}
+};
+
class SyncEngineTest : public testing::Test {
protected:
SyncEngineTest()
@@ -209,6 +227,8 @@ class SyncEngineTest : public testing::Test {
params.registrar = base::MakeUnique<SyncBackendRegistrar>(
std::string(), base::Bind(&SyncClient::CreateModelWorkerForGroup,
base::Unretained(&sync_client_)));
+ params.encryption_observer_proxy =
+ base::MakeUnique<NullEncryptionObserver>();
params.http_factory_getter = http_post_provider_factory_getter;
params.credentials = credentials_;
params.sync_manager_factory = std::move(fake_manager_factory_);
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.cc ('k') | components/sync/driver/sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698