| 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/sync_manager_impl.h" |     5 #include "sync/internal_api/sync_manager_impl.h" | 
|     6  |     6  | 
|     7 #include <string> |     7 #include <string> | 
|     8  |     8  | 
|     9 #include "base/base64.h" |     9 #include "base/base64.h" | 
|    10 #include "base/bind.h" |    10 #include "base/bind.h" | 
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   939  |   939  | 
|   940 void SyncManagerImpl::OnThrottledTypesChanged(ModelTypeSet) {} |   940 void SyncManagerImpl::OnThrottledTypesChanged(ModelTypeSet) {} | 
|   941  |   941  | 
|   942 void SyncManagerImpl::OnMigrationRequested(ModelTypeSet types) { |   942 void SyncManagerImpl::OnMigrationRequested(ModelTypeSet types) { | 
|   943   FOR_EACH_OBSERVER( |   943   FOR_EACH_OBSERVER( | 
|   944       SyncManager::Observer, observers_, |   944       SyncManager::Observer, observers_, | 
|   945       OnMigrationRequested(types)); |   945       OnMigrationRequested(types)); | 
|   946 } |   946 } | 
|   947  |   947  | 
|   948 void SyncManagerImpl::OnProtocolEvent(const ProtocolEvent& event) { |   948 void SyncManagerImpl::OnProtocolEvent(const ProtocolEvent& event) { | 
 |   949   protocol_event_buffer_.RecordProtocolEvent(event); | 
|   949   FOR_EACH_OBSERVER(SyncManager::Observer, observers_, |   950   FOR_EACH_OBSERVER(SyncManager::Observer, observers_, | 
|   950                     OnProtocolEvent(event)); |   951                     OnProtocolEvent(event)); | 
|   951 } |   952 } | 
|   952  |   953  | 
|   953 void SyncManagerImpl::SetJsEventHandler( |   954 void SyncManagerImpl::SetJsEventHandler( | 
|   954     const WeakHandle<JsEventHandler>& event_handler) { |   955     const WeakHandle<JsEventHandler>& event_handler) { | 
|   955   js_sync_manager_observer_.SetJsEventHandler(event_handler); |   956   js_sync_manager_observer_.SetJsEventHandler(event_handler); | 
|   956   js_mutation_event_observer_.SetJsEventHandler(event_handler); |   957   js_mutation_event_observer_.SetJsEventHandler(event_handler); | 
|   957   js_sync_encryption_handler_observer_.SetJsEventHandler(event_handler); |   958   js_sync_encryption_handler_observer_.SetJsEventHandler(event_handler); | 
|   958 } |   959 } | 
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1154  |  1155  | 
|  1155 bool SyncManagerImpl::HasUnsyncedItems() { |  1156 bool SyncManagerImpl::HasUnsyncedItems() { | 
|  1156   ReadTransaction trans(FROM_HERE, GetUserShare()); |  1157   ReadTransaction trans(FROM_HERE, GetUserShare()); | 
|  1157   return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |  1158   return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 
|  1158 } |  1159 } | 
|  1159  |  1160  | 
|  1160 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { |  1161 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { | 
|  1161   return sync_encryption_handler_.get(); |  1162   return sync_encryption_handler_.get(); | 
|  1162 } |  1163 } | 
|  1163  |  1164  | 
 |  1165 ScopedVector<syncer::ProtocolEvent> | 
 |  1166     SyncManagerImpl::GetBufferedProtocolEvents() { | 
 |  1167   return protocol_event_buffer_.GetBufferedProtocolEvents(); | 
 |  1168 } | 
 |  1169  | 
|  1164 // static. |  1170 // static. | 
|  1165 int SyncManagerImpl::GetDefaultNudgeDelay() { |  1171 int SyncManagerImpl::GetDefaultNudgeDelay() { | 
|  1166   return kDefaultNudgeDelayMilliseconds; |  1172   return kDefaultNudgeDelayMilliseconds; | 
|  1167 } |  1173 } | 
|  1168  |  1174  | 
|  1169 // static. |  1175 // static. | 
|  1170 int SyncManagerImpl::GetPreferencesNudgeDelay() { |  1176 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 
|  1171   return kPreferencesNudgeDelayMilliseconds; |  1177   return kPreferencesNudgeDelayMilliseconds; | 
|  1172 } |  1178 } | 
|  1173  |  1179  | 
|  1174 }  // namespace syncer |  1180 }  // namespace syncer | 
| OLD | NEW |