| 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_manager_observer.h" | 5 #include "sync/internal_api/js_sync_manager_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const SyncProtocolError& sync_error) { | 53 const SyncProtocolError& sync_error) { |
| 54 if (!event_handler_.IsInitialized()) { | 54 if (!event_handler_.IsInitialized()) { |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 base::DictionaryValue details; | 57 base::DictionaryValue details; |
| 58 details.Set("syncError", sync_error.ToValue()); | 58 details.Set("syncError", sync_error.ToValue()); |
| 59 HandleJsEvent(FROM_HERE, "onActionableError", | 59 HandleJsEvent(FROM_HERE, "onActionableError", |
| 60 JsEventDetails(&details)); | 60 JsEventDetails(&details)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void JsSyncManagerObserver::OnMigrationRequested(ModelTypeSet types) { } |
| 64 |
| 63 void JsSyncManagerObserver::OnInitializationComplete( | 65 void JsSyncManagerObserver::OnInitializationComplete( |
| 64 const WeakHandle<JsBackend>& js_backend, | 66 const WeakHandle<JsBackend>& js_backend, |
| 65 const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener, | 67 const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener, |
| 66 bool success, syncer::ModelTypeSet restored_types) { | 68 bool success, syncer::ModelTypeSet restored_types) { |
| 67 if (!event_handler_.IsInitialized()) { | 69 if (!event_handler_.IsInitialized()) { |
| 68 return; | 70 return; |
| 69 } | 71 } |
| 70 // Ignore the |js_backend| argument; it's not really convertible to | 72 // Ignore the |js_backend| argument; it's not really convertible to |
| 71 // JSON anyway. | 73 // JSON anyway. |
| 72 | 74 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 90 const std::string& name, const JsEventDetails& details) { | 92 const std::string& name, const JsEventDetails& details) { |
| 91 if (!event_handler_.IsInitialized()) { | 93 if (!event_handler_.IsInitialized()) { |
| 92 NOTREACHED(); | 94 NOTREACHED(); |
| 93 return; | 95 return; |
| 94 } | 96 } |
| 95 event_handler_.Call(from_here, | 97 event_handler_.Call(from_here, |
| 96 &JsEventHandler::HandleJsEvent, name, details); | 98 &JsEventHandler::HandleJsEvent, name, details); |
| 97 } | 99 } |
| 98 | 100 |
| 99 } // namespace syncer | 101 } // namespace syncer |
| OLD | NEW |