Skip to content

Commit

Permalink
sync: Include control types in node browser
Browse files Browse the repository at this point in the history
Explicitly add the control types to the list of types to fetch nodes for
during a request to GetAllNodes().  The control types don't register
with the ProfileSyncService at startup like the other types do, so
they're not in the list of GetRegisteredDirectoryDataTypes like the
others.

BUG=368012

Review URL: https://codereview.chromium.org/251133005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266803 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rlarocque@chromium.org committed Apr 29, 2014
1 parent ef54a3b commit f62231f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/sync/profile_sync_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2155,8 +2155,8 @@ void GetAllNodesRequestHelper::OnReceivedNodesForTypes(

void ProfileSyncService::GetAllNodes(
const base::Callback<void(scoped_ptr<base::ListValue>)>& callback) {
// TODO(rlarocque): Should be GetRegisteredDirectoryTypes.
const ModelTypeSet directory_types = GetRegisteredDataTypes();
ModelTypeSet directory_types = GetRegisteredDirectoryDataTypes();
directory_types.PutAll(syncer::ControlTypes());
scoped_refptr<GetAllNodesRequestHelper> helper =
new GetAllNodesRequestHelper(directory_types, callback);

Expand Down
6 changes: 4 additions & 2 deletions sync/internal_api/sync_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,10 @@ scoped_ptr<base::ListValue> SyncManagerImpl::GetAllNodesForType(
DirectoryTypeDebugInfoEmitterMap::iterator it = emitter_map->find(type);

if (it == emitter_map->end()) {
NOTREACHED() << "Asked to return debug info for invalid type "
<< ModelTypeToString(type);
// This can happen in some cases. The UI thread makes requests of us
// when it doesn't really know which types are enabled or disabled.
DLOG(WARNING) << "Asked to return debug info for invalid type "
<< ModelTypeToString(type);
return scoped_ptr<base::ListValue>();
}

Expand Down

0 comments on commit f62231f

Please sign in to comment.