summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/sync_encryption_handler_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Chrome sync: Put WeakPtrFactory members at the enddmichael@chromium.org2013-10-101-2/+2
| | | | | | | | | | BUG=303818 R=akalin@chromium.org, nhiroki@chromium.org TBR=nhiroki@chromium.org Review URL: https://codereview.chromium.org/26594002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227944 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in rlz/, skia/, sql/, sync/.avi@chromium.org2013-06-281-2/+2
| | | | | | | | | | BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/18031009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209152 0039d316-1c4b-4281-b951-d872f2087c98
* [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/rsimha@chromium.org2013-01-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | One of the long term goals of the sync team is to pull sync code out of chrome.dll and into its own component. As of today, several chrome targets depend on various sync targets as defined in sync.gyp. We'd like to move to a world where all chrome targets outside sync.gyp simply depend on the target sync.gyp:sync, which is built into its own component. This patch sets the stage for full componentization by adding SYNC_EXPORT_PRIVATE (and some SYNC_EXPORT) annotations to classes / methods within src/sync so that various chrome targets can reference them. It also makes a few assorted fixes like adding missing destructors, etc. These errors get flagged when component builds are enabled after componentizing sync. The final step of breaking off sync into its own component will be done in https://codereview.chromium.org/11412211. BUG=136928 Review URL: https://codereview.chromium.org/11624037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174801 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for keystore key rotation.zea@chromium.org2012-12-191-5/+12
| | | | | | | | | | | | | | | | | | | | Key rotation will trigger a full re-encryption of all sync data with the newest keystore key. Previous keys will be added to the keybag as well. We detect key rotation by checking whether we have multiple keystore keys and the nigori's keybag is not encrypted with the current keystore key. In that case, we no longer support backwards compatibility with non-keystore supporting versions, and re-encrypt using the newest keystore key. This change also fixes two latent issues: lack of encryption of the keystore bootstrap and not properly posting OnPassphraseAccepted when we resolve pending keys. BUG=163744 Review URL: https://chromiumcodereview.appspot.com/11434070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173830 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add custom passphrase time trackingzea@chromium.org2012-10-121-0/+10
| | | | | | | | | | | | | | | | 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
* [Sync] Add keystore encryption info to about:synczea@chromium.org2012-09-191-5/+4
| | | | | | | | | | | | | | | | | | | This patch adds the following fields under the encryption section of about:sync - Has Keystore Key: whether the encryption handler has a keystore encryption key - Migration Time: the time migration was performed, or "Not Migrated" if migration hasn't been performed yet - Passphrase Type: the actual passphrase type (provides more detail than Is Using Explicit Passphrase, but stored at a diff layer) Added sync/api/time.h, which just includes sync/util/time.h but is accessible from chrome/ BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10917246 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157499 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add keystore migration conflict support.zea@chromium.org2012-09-171-0/+2
| | | | | | | | | | | | | We rely on the encryption handler's rollback detection for any cases where conflicts might lose data and we can't merge. Else, we merge the data as needed. BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10905191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157186 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Implement keystore migration support.zea@chromium.org2012-09-131-3/+93
| | | | | | | | | | | | | | | | | | | | | | | We'll now trigger migration if the keystore key is available, the cryptographer is ready, and the nigori node isn't already properly migrated. Note that this means we won't trigger migration without at least the implicit gaia password already available to the cryptographer, in order to support backwards compatibility with older clients. Eventually that will change. In addition, once a nigori node has been migrated, any client that supports keystore encryption will follow the new encryption constraints, whether or not the --sync-keystore-encryption flag is passed. This means that if the user sets a custom passphrase, encrypt everything will also be enabled (and vice versa). Migration-aware conflict resolution is not implemented yet. BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10916036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156646 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move keystore key handling to SyncEncryptionHandlerImplzea@chromium.org2012-08-291-2/+13
| | | | | | | | | | | | The cryptographer has no notion of keystore keys, and we now persist the keystore key by reusing the OnBoostrapTokenUpdated method (which now takes an enum as an extra param specifying the type of token). BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10878015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154007 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor passphrase state handlingzea@chromium.org2012-08-261-5/+4
| | | | | | | | | | | | | | We now have an enum describing passphrase state, and cache the current value on the UI thread via a new OnPassphraseStateChanged method. Additionally, we log the OnPassphraseStateChanged event in the debug log info. BUG=139848, 129665 Review URL: https://chromiumcodereview.appspot.com/10824410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153397 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor GetEncryptedTypes usage.zea@chromium.org2012-08-241-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | The cryptographer is now owned by the SyncEncryptionHandlerImpl, and no longer needs any connection to the nigori handler or encrypted types. Those are accessed via the directory, which now has a GetNigoriHandler method. Because of this, we can now clean up the thread safety guarantees in the sync encryption handler impl, enforcing that everything except GetEncryptedTypes (and IsUsingExplicitPassphrase, which will be fixed in a followup patch) are invoked on the syncer thread. This lets us not have to open unnecessary transactions. At the chrome layer, encrypted types are accessed via BaseTransaction:: GetEncryptedTypes(). At the syncer layer, they're accessed via directory:: GetNigoriHandler()->GetEncryptedTypes(BaseTransaction* trans const). BUG=142476,139848 Review URL: https://chromiumcodereview.appspot.com/10844005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153335 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add SyncEncryptionHandlerzea@chromium.org2012-08-161-0/+161
All sync-specific encryption state (types, encrypt everything, explicit passphrase, keys) is now tracked within the new class SyncEncryptionHandler. It's owned by the sync manager, and unifies some of the observer logic we previously had. In addition, it's capable of creating its own transactions, taking us a step closer to have a nigori datatype. In addition, we add a NigoriHandler to abstract the chrome-side of encryption from the sync visible side of encryption. BUG=139848 Review URL: https://chromiumcodereview.appspot.com/10827266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151833 0039d316-1c4b-4281-b951-d872f2087c98