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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 syncer::EXPERIMENTS, syncer::kGCMInvalidationsTag) == | 1003 syncer::EXPERIMENTS, syncer::kGCMInvalidationsTag) == |
1004 BaseNode::INIT_OK) { | 1004 BaseNode::INIT_OK) { |
1005 const sync_pb::GcmInvalidationsFlags& gcm_invalidations = | 1005 const sync_pb::GcmInvalidationsFlags& gcm_invalidations = |
1006 gcm_invalidations_node.GetExperimentsSpecifics().gcm_invalidations(); | 1006 gcm_invalidations_node.GetExperimentsSpecifics().gcm_invalidations(); |
1007 if (gcm_invalidations.has_enabled()) { | 1007 if (gcm_invalidations.has_enabled()) { |
1008 experiments->gcm_invalidations_enabled = gcm_invalidations.enabled(); | 1008 experiments->gcm_invalidations_enabled = gcm_invalidations.enabled(); |
1009 found_experiment = true; | 1009 found_experiment = true; |
1010 } | 1010 } |
1011 } | 1011 } |
1012 | 1012 |
| 1013 ReadNode wallet_sync_node(&trans); |
| 1014 if (wallet_sync_node.InitByClientTagLookup( |
| 1015 syncer::EXPERIMENTS, syncer::kWalletSyncTag) == BaseNode::INIT_OK) { |
| 1016 const sync_pb::WalletSyncFlags& wallet_sync = |
| 1017 wallet_sync_node.GetExperimentsSpecifics().wallet_sync(); |
| 1018 if (wallet_sync.has_enabled()) { |
| 1019 experiments->wallet_sync_enabled = wallet_sync.enabled(); |
| 1020 found_experiment = true; |
| 1021 } |
| 1022 } |
| 1023 |
1013 return found_experiment; | 1024 return found_experiment; |
1014 } | 1025 } |
1015 | 1026 |
1016 bool SyncManagerImpl::HasUnsyncedItems() { | 1027 bool SyncManagerImpl::HasUnsyncedItems() { |
1017 ReadTransaction trans(FROM_HERE, GetUserShare()); | 1028 ReadTransaction trans(FROM_HERE, GetUserShare()); |
1018 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 1029 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |
1019 } | 1030 } |
1020 | 1031 |
1021 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { | 1032 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { |
1022 return sync_encryption_handler_.get(); | 1033 return sync_encryption_handler_.get(); |
(...skipping 17 matching lines...) Expand all Loading... |
1040 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver( | 1051 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver( |
1041 syncer::TypeDebugInfoObserver* observer) { | 1052 syncer::TypeDebugInfoObserver* observer) { |
1042 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer); | 1053 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer); |
1043 } | 1054 } |
1044 | 1055 |
1045 void SyncManagerImpl::RequestEmitDebugInfo() { | 1056 void SyncManagerImpl::RequestEmitDebugInfo() { |
1046 model_type_registry_->RequestEmitDebugInfo(); | 1057 model_type_registry_->RequestEmitDebugInfo(); |
1047 } | 1058 } |
1048 | 1059 |
1049 } // namespace syncer | 1060 } // namespace syncer |
OLD | NEW |