summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/js_sync_manager_observer.cc
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-16 02:34:16 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-16 02:34:16 +0000
commit4cda788849ffa2942fe593d7b1e4ddd2ff8e30d6 (patch)
tree503db151113cb71fc5a26bc0c9f0d4b748f2865b /sync/internal_api/js_sync_manager_observer.cc
parent10df83e1635617ef38ca9c40bdaf725e00154bb7 (diff)
downloadchromium_src-4cda788849ffa2942fe593d7b1e4ddd2ff8e30d6.zip
chromium_src-4cda788849ffa2942fe593d7b1e4ddd2ff8e30d6.tar.gz
chromium_src-4cda788849ffa2942fe593d7b1e4ddd2ff8e30d6.tar.bz2
[Sync] Add SyncEncryptionHandler
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
Diffstat (limited to 'sync/internal_api/js_sync_manager_observer.cc')
-rw-r--r--sync/internal_api/js_sync_manager_observer.cc52
1 files changed, 0 insertions, 52 deletions
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index f017107..dd7c7a9 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -59,58 +59,6 @@ void JsSyncManagerObserver::OnUpdatedToken(const std::string& token) {
HandleJsEvent(FROM_HERE, "onUpdatedToken", JsEventDetails(&details));
}
-void JsSyncManagerObserver::OnPassphraseRequired(
- PassphraseRequiredReason reason,
- const sync_pb::EncryptedData& pending_keys) {
- if (!event_handler_.IsInitialized()) {
- return;
- }
- DictionaryValue details;
- details.SetString("reason",
- PassphraseRequiredReasonToString(reason));
- HandleJsEvent(FROM_HERE, "onPassphraseRequired", JsEventDetails(&details));
-}
-
-void JsSyncManagerObserver::OnPassphraseAccepted() {
- if (!event_handler_.IsInitialized()) {
- return;
- }
- DictionaryValue details;
- HandleJsEvent(FROM_HERE, "onPassphraseAccepted", JsEventDetails(&details));
-}
-
-void JsSyncManagerObserver::OnBootstrapTokenUpdated(
- const std::string& boostrap_token) {
- if (!event_handler_.IsInitialized()) {
- return;
- }
- DictionaryValue details;
- details.SetString("bootstrapToken", "<redacted>");
- HandleJsEvent(FROM_HERE, "OnBootstrapTokenUpdated", JsEventDetails(&details));
-}
-
-void JsSyncManagerObserver::OnEncryptedTypesChanged(
- ModelTypeSet encrypted_types,
- bool encrypt_everything) {
- if (!event_handler_.IsInitialized()) {
- return;
- }
- DictionaryValue details;
- details.Set("encryptedTypes",
- ModelTypeSetToValue(encrypted_types));
- details.SetBoolean("encryptEverything", encrypt_everything);
- HandleJsEvent(FROM_HERE,
- "onEncryptedTypesChanged", JsEventDetails(&details));
-}
-
-void JsSyncManagerObserver::OnEncryptionComplete() {
- if (!event_handler_.IsInitialized()) {
- return;
- }
- DictionaryValue details;
- HandleJsEvent(FROM_HERE, "onEncryptionComplete", JsEventDetails());
-}
-
void JsSyncManagerObserver::OnActionableError(
const SyncProtocolError& sync_error) {
if (!event_handler_.IsInitialized()) {