diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 18:54:39 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 18:54:39 +0000 |
commit | 3fa964af1c44352d08fca3a4bb0cad6006b3640c (patch) | |
tree | 4e92d801c0566acfa9531ad31a2813e4f2cf71b8 /chrome/browser/sync/js_sync_manager_observer.cc | |
parent | ef3facf5d7cae5977657f6ff7dfe3f14746eb08b (diff) | |
download | chromium_src-3fa964af1c44352d08fca3a4bb0cad6006b3640c.zip chromium_src-3fa964af1c44352d08fca3a4bb0cad6006b3640c.tar.gz chromium_src-3fa964af1c44352d08fca3a4bb0cad6006b3640c.tar.bz2 |
[Sync] Unrevert r75287 (initial support for sync encryption of all datatypes). Fix passphrase race.
BUG=73218,59242
TEST=unit,sync_unit,sync_integration
Review URL: http://codereview.chromium.org/6561001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/js_sync_manager_observer.cc')
-rw-r--r-- | chrome/browser/sync/js_sync_manager_observer.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/sync/js_sync_manager_observer.cc b/chrome/browser/sync/js_sync_manager_observer.cc index ef6eb06..3999fdd 100644 --- a/chrome/browser/sync/js_sync_manager_observer.cc +++ b/chrome/browser/sync/js_sync_manager_observer.cc @@ -12,7 +12,6 @@ #include "chrome/browser/sync/js_event_router.h" #include "chrome/browser/sync/sessions/session_state.h" #include "chrome/browser/sync/syncable/model_type.h" -#include "chrome/browser/sync/sessions/session_state.h" namespace browser_sync { @@ -79,6 +78,10 @@ void JsSyncManagerObserver::OnPassphraseRequired(bool for_decryption) { JsArgList(return_args), NULL); } +void JsSyncManagerObserver::OnPassphraseFailed() { + parent_router_->RouteJsEvent("onPassphraseFailed", JsArgList(), NULL); +} + void JsSyncManagerObserver::OnPassphraseAccepted( const std::string& bootstrap_token) { ListValue return_args; @@ -87,6 +90,14 @@ void JsSyncManagerObserver::OnPassphraseAccepted( JsArgList(return_args), NULL); } +void JsSyncManagerObserver::OnEncryptionComplete( + const syncable::ModelTypeSet& encrypted_types) { + ListValue return_args; + return_args.Append(syncable::ModelTypeSetToValue(encrypted_types)); + parent_router_->RouteJsEvent("onEncryptionComplete", + JsArgList(return_args), NULL); +} + void JsSyncManagerObserver::OnInitializationComplete() { parent_router_->RouteJsEvent("onInitializationComplete", JsArgList(), NULL); |