sync: Include control types in node browser

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
parent ef54a3b2
......@@ -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);
......
......@@ -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>();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment