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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 syncer::ModelType type) { | 963 syncer::ModelType type) { |
964 DirectoryTypeDebugInfoEmitterMap* emitter_map = | 964 DirectoryTypeDebugInfoEmitterMap* emitter_map = |
965 model_type_registry_->directory_type_debug_info_emitter_map(); | 965 model_type_registry_->directory_type_debug_info_emitter_map(); |
966 DirectoryTypeDebugInfoEmitterMap::iterator it = emitter_map->find(type); | 966 DirectoryTypeDebugInfoEmitterMap::iterator it = emitter_map->find(type); |
967 | 967 |
968 if (it == emitter_map->end()) { | 968 if (it == emitter_map->end()) { |
969 // This can happen in some cases. The UI thread makes requests of us | 969 // This can happen in some cases. The UI thread makes requests of us |
970 // when it doesn't really know which types are enabled or disabled. | 970 // when it doesn't really know which types are enabled or disabled. |
971 DLOG(WARNING) << "Asked to return debug info for invalid type " | 971 DLOG(WARNING) << "Asked to return debug info for invalid type " |
972 << ModelTypeToString(type); | 972 << ModelTypeToString(type); |
973 return scoped_ptr<base::ListValue>(); | 973 return scoped_ptr<base::ListValue>(new base::ListValue()); |
974 } | 974 } |
975 | 975 |
976 return it->second->GetAllNodes(); | 976 return it->second->GetAllNodes(); |
977 } | 977 } |
978 | 978 |
979 void SyncManagerImpl::SetInvalidatorEnabled(bool invalidator_enabled) { | 979 void SyncManagerImpl::SetInvalidatorEnabled(bool invalidator_enabled) { |
980 DCHECK(thread_checker_.CalledOnValidThread()); | 980 DCHECK(thread_checker_.CalledOnValidThread()); |
981 | 981 |
982 DVLOG(1) << "Invalidator enabled state is now: " << invalidator_enabled; | 982 DVLOG(1) << "Invalidator enabled state is now: " << invalidator_enabled; |
983 allstatus_.SetNotificationsEnabled(invalidator_enabled); | 983 allstatus_.SetNotificationsEnabled(invalidator_enabled); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1140 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1141 return kDefaultNudgeDelayMilliseconds; | 1141 return kDefaultNudgeDelayMilliseconds; |
1142 } | 1142 } |
1143 | 1143 |
1144 // static. | 1144 // static. |
1145 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1145 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1146 return kPreferencesNudgeDelayMilliseconds; | 1146 return kPreferencesNudgeDelayMilliseconds; |
1147 } | 1147 } |
1148 | 1148 |
1149 } // namespace syncer | 1149 } // namespace syncer |
OLD | NEW |