diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 09:31:16 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 09:31:16 +0000 |
commit | f62231f85cfb445a96fd12e26164580dfa9130cc (patch) | |
tree | 694bfb41108fbab0037d4993dafdd18746e624a4 | |
parent | ef54a3b2c34bdca0e31d6a753028c524109a479c (diff) | |
download | chromium_src-f62231f85cfb445a96fd12e26164580dfa9130cc.zip chromium_src-f62231f85cfb445a96fd12e26164580dfa9130cc.tar.gz chromium_src-f62231f85cfb445a96fd12e26164580dfa9130cc.tar.bz2 |
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
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 4 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl.cc | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 31cfd6c..cc2b72f 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -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); diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc index 7658f58..a742690 100644 --- a/sync/internal_api/sync_manager_impl.cc +++ b/sync/internal_api/sync_manager_impl.cc @@ -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>(); } |