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

Side by Side Diff: components/sync/engine/sync_encryption_handler.h

Issue 2401083003: [Sync] Adding integration tests for USS encryption and fixing a worker bug. (Closed)
Patch Set: Updated for rkaplow@'s comments. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_
6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_ 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // - If the passphrase is required for the decryption of data that has 55 // - If the passphrase is required for the decryption of data that has
56 // already been encrypted, |reason| will be REASON_DECRYPTION. 56 // already been encrypted, |reason| will be REASON_DECRYPTION.
57 // - If the passphrase is required because decryption failed, and a new 57 // - If the passphrase is required because decryption failed, and a new
58 // passphrase is required, |reason| will be REASON_SET_PASSPHRASE_FAILED. 58 // passphrase is required, |reason| will be REASON_SET_PASSPHRASE_FAILED.
59 // 59 //
60 // |pending_keys| is a copy of the cryptographer's pending keys, that may be 60 // |pending_keys| is a copy of the cryptographer's pending keys, that may be
61 // cached by the frontend for subsequent use by the UI. 61 // cached by the frontend for subsequent use by the UI.
62 virtual void OnPassphraseRequired( 62 virtual void OnPassphraseRequired(
63 PassphraseRequiredReason reason, 63 PassphraseRequiredReason reason,
64 const sync_pb::EncryptedData& pending_keys) = 0; 64 const sync_pb::EncryptedData& pending_keys) = 0;
65
65 // Called when the passphrase provided by the user has been accepted and is 66 // Called when the passphrase provided by the user has been accepted and is
66 // now used to encrypt sync data. 67 // now used to encrypt sync data.
68 virtual void OnPassphraseAccepted() = 0;
67 69
68 virtual void OnPassphraseAccepted() = 0;
69 // |bootstrap_token| is an opaque base64 encoded representation of the key 70 // |bootstrap_token| is an opaque base64 encoded representation of the key
70 // generated by the current passphrase, and is provided to the observer for 71 // generated by the current passphrase, and is provided to the observer for
71 // persistence purposes and use in a future initialization of sync (e.g. 72 // persistence purposes and use in a future initialization of sync (e.g.
72 // after restart). The boostrap token will always be derived from the most 73 // after restart). The boostrap token will always be derived from the most
73 // recent GAIA password (for accounts with implicit passphrases), even if 74 // recent GAIA password (for accounts with implicit passphrases), even if
74 // the data is still encrypted with an older GAIA password. For accounts 75 // the data is still encrypted with an older GAIA password. For accounts
75 // with explicit passphrases, it will be the most recently seen custom 76 // with explicit passphrases, it will be the most recently seen custom
76 // passphrase. 77 // passphrase.
77 virtual void OnBootstrapTokenUpdated(const std::string& bootstrap_token, 78 virtual void OnBootstrapTokenUpdated(const std::string& bootstrap_token,
78 BootstrapTokenType type) = 0; 79 BootstrapTokenType type) = 0;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // types are encrypted. 167 // types are encrypted.
167 virtual bool IsEncryptEverythingEnabled() const = 0; 168 virtual bool IsEncryptEverythingEnabled() const = 0;
168 169
169 // The set of types that are always encrypted. 170 // The set of types that are always encrypted.
170 static ModelTypeSet SensitiveTypes(); 171 static ModelTypeSet SensitiveTypes();
171 }; 172 };
172 173
173 } // namespace syncer 174 } // namespace syncer
174 175
175 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_ 176 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENCRYPTION_HANDLER_H_
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/engine_impl/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698