| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "sync/internal_api/js_sync_encryption_handler_observer.h" | 5 #include "sync/internal_api/js_sync_encryption_handler_observer.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 base::DictionaryValue details; | 106 base::DictionaryValue details; |
| 107 details.SetString("passphraseType", | 107 details.SetString("passphraseType", |
| 108 PassphraseTypeToString(type)); | 108 PassphraseTypeToString(type)); |
| 109 details.SetInteger("explicitPassphraseTime", | 109 details.SetInteger("explicitPassphraseTime", |
| 110 TimeToProtoTime(explicit_passphrase_time)); | 110 TimeToProtoTime(explicit_passphrase_time)); |
| 111 HandleJsEvent(FROM_HERE, | 111 HandleJsEvent(FROM_HERE, |
| 112 "onPassphraseTypeChanged", | 112 "onPassphraseTypeChanged", |
| 113 JsEventDetails(&details)); | 113 JsEventDetails(&details)); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void JsSyncEncryptionHandlerObserver::OnLocalSetCustomPassphrase( |
| 117 const SyncEncryptionHandler::NigoriState& nigori_state) { |
| 118 } |
| 119 |
| 116 void JsSyncEncryptionHandlerObserver::HandleJsEvent( | 120 void JsSyncEncryptionHandlerObserver::HandleJsEvent( |
| 117 const tracked_objects::Location& from_here, | 121 const tracked_objects::Location& from_here, |
| 118 const std::string& name, const JsEventDetails& details) { | 122 const std::string& name, const JsEventDetails& details) { |
| 119 if (!event_handler_.IsInitialized()) { | 123 if (!event_handler_.IsInitialized()) { |
| 120 NOTREACHED(); | 124 NOTREACHED(); |
| 121 return; | 125 return; |
| 122 } | 126 } |
| 123 event_handler_.Call(from_here, | 127 event_handler_.Call(from_here, |
| 124 &JsEventHandler::HandleJsEvent, name, details); | 128 &JsEventHandler::HandleJsEvent, name, details); |
| 125 } | 129 } |
| 126 | 130 |
| 127 } // namespace syncer | 131 } // namespace syncer |
| OLD | NEW |