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

Unified Diff: components/sync/engine/sync_engine.h

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/engine/sync_encryption_handler.h ('k') | components/sync/engine/sync_engine_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine/sync_engine.h
diff --git a/components/sync/engine/sync_engine.h b/components/sync/engine/sync_engine.h
index 55cd760c2e62528d888e99c7a239d6b8690dbd17..03eadfa0e20397acc5e826d7b9901af66077d572 100644
--- a/components/sync/engine/sync_engine.h
+++ b/components/sync/engine/sync_engine.h
@@ -56,6 +56,7 @@ class SyncEngine : public ModelTypeConfigurer {
scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner;
SyncEngineHost* host = nullptr;
std::unique_ptr<SyncBackendRegistrar> registrar;
+ std::unique_ptr<SyncEncryptionHandler::Observer> encryption_observer_proxy;
scoped_refptr<ExtensionsActivity> extensions_activity;
WeakHandle<JsEventHandler> event_handler;
GURL service_url;
@@ -118,14 +119,11 @@ class SyncEngine : public ModelTypeConfigurer {
virtual void SetEncryptionPassphrase(const std::string& passphrase,
bool is_explicit) = 0;
- // Use the provided passphrase to asynchronously attempt decryption. Returns
- // false immediately if the passphrase could not be used to decrypt a locally
- // cached copy of encrypted keys; returns true otherwise. If new encrypted
- // keys arrive during the asynchronous call, OnPassphraseRequired may be
- // triggered at a later time. It is an error to call this when there are no
- // pending keys.
- virtual bool SetDecryptionPassphrase(const std::string& passphrase)
- WARN_UNUSED_RESULT = 0;
+ // Use the provided passphrase to asynchronously attempt decryption. If new
+ // encrypted keys arrive during the asynchronous call, OnPassphraseRequired
+ // may be triggered at a later time. It is an error to call this when there
+ // are no pending keys.
+ virtual void SetDecryptionPassphrase(const std::string& passphrase) = 0;
// Kick off shutdown procedure. Attempts to cut short any long-lived or
// blocking sync thread tasks so that the shutdown on sync thread task that
@@ -152,17 +150,6 @@ class SyncEngine : public ModelTypeConfigurer {
// ONLY CALL THIS IF OnInitializationComplete was called!
virtual bool HasUnsyncedItems() const = 0;
- // Whether or not we are syncing encryption keys.
- virtual bool IsNigoriEnabled() const = 0;
-
- // Returns the type of passphrase being used to encrypt data. See
- // sync_encryption_handler.h.
- virtual PassphraseType GetPassphraseType() const = 0;
-
- // If an explicit passphrase is in use, returns the time at which that
- // passphrase was set (if available).
- virtual base::Time GetExplicitPassphraseTime() const = 0;
-
// True if the cryptographer has any keys available to attempt decryption.
// Could mean we've downloaded and loaded Nigori objects, or we bootstrapped
// using a token previously received.
« no previous file with comments | « components/sync/engine/sync_encryption_handler.h ('k') | components/sync/engine/sync_engine_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698