summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/sync_encryption_handler_impl.h
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 02:22:43 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 02:22:43 +0000
commitf6661ccc5aa6aca1c2130936a8905e74ced35599 (patch)
tree4f2d30459db53c3c21cddd5cefc10014e53432f2 /sync/internal_api/sync_encryption_handler_impl.h
parent1682cca17b73be6a7c60c69b3567e592d7e8a9b7 (diff)
downloadchromium_src-f6661ccc5aa6aca1c2130936a8905e74ced35599.zip
chromium_src-f6661ccc5aa6aca1c2130936a8905e74ced35599.tar.gz
chromium_src-f6661ccc5aa6aca1c2130936a8905e74ced35599.tar.bz2
[Sync] Add custom passphrase time tracking
We now track when a custom passphrase is set, and in conjunction with the migration time now support querying the passphrase time (returns migration time for FROZEN_IMPLICIT type, or custom passphrase time for CUSTOM_PASSPHRASE type). Plumb this information up through to the PSS for eventual use in the UI. BUG=129665 Review URL: https://chromiumcodereview.appspot.com/11098007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_encryption_handler_impl.h')
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sync/internal_api/sync_encryption_handler_impl.h b/sync/internal_api/sync_encryption_handler_impl.h
index 27f7080..d93db15 100644
--- a/sync/internal_api/sync_encryption_handler_impl.h
+++ b/sync/internal_api/sync_encryption_handler_impl.h
@@ -87,6 +87,7 @@ class SyncEncryptionHandlerImpl
bool MigratedToKeystore();
base::Time migration_time() const;
+ base::Time custom_passphrase_time() const;
private:
FRIEND_TEST_ALL_PREFIXES(SyncEncryptionHandlerImplTest,
@@ -256,6 +257,10 @@ class SyncEncryptionHandlerImpl
// Will not perform re-encryption.
void EnableEncryptEverythingImpl(syncable::BaseTransaction* const trans);
+ // If an explicit passphrase is in use, returns the time at which it was set
+ // (if known). Else return base::Time().
+ base::Time GetExplicitPassphraseTime() const;
+
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<SyncEncryptionHandlerImpl> weak_ptr_factory_;
@@ -289,6 +294,11 @@ class SyncEncryptionHandlerImpl
// The time the nigori was migrated to support keystore encryption.
base::Time migration_time_;
+ // The time the custom passphrase was set for this account. Not valid
+ // if there is no custom passphrase or the custom passphrase was set
+ // before support for this field was added.
+ base::Time custom_passphrase_time_;
+
DISALLOW_COPY_AND_ASSIGN(SyncEncryptionHandlerImpl);
};