Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: sync/internal_api/sync_manager_impl.cc

Issue 480633002: sync: Fix return value in GetAllNodesForType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698