sync: remove Chrome OS specific logic to deal with flimflam shutdown / sync race.

No longer necessary as the ProfileSyncService now aborts sync network traffic on shutdown.

BUG=chromium-os:20841


Review URL: http://codereview.chromium.org/9358007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120912 0039d316-1c4b-4281-b951-d872f2087c98
syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
    syncable::ModelTypeSet types,
    sync_api::UserShare* share) {
  syncable::ScopedDirLookup lookup(share->dir_manager.get(),
                                   share->name);
  if (!lookup.good()) {
    NOTREACHED() << "ScopedDirLookup failed for "
                  << "GetTypesWithEmptyProgressMarkerToken";
    return syncable::ModelTypeSet();
  }

  syncable::ModelTypeSet result;
  for (syncable::ModelTypeSet::Iterator i = types.First();
       i.Good(); i.Inc()) {
    sync_pb::DataTypeProgressMarker marker;
    lookup->GetDownloadProgress(i.Get(), &marker);

    if (marker.token().empty())
      result.Put(i.Get());

  }
  return result;
}

syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
    syncable::ModelTypeSet types,
    sync_api::UserShare* share) {
  syncable::ScopedDirLookup lookup(share->dir_manager.get(),
                                   share->name);
  if (!lookup.good()) {
    NOTREACHED() << "ScopedDirLookup failed for "
                  << "GetTypesWithEmptyProgressMarkerToken";
    return syncable::ModelTypeSet();
  }

  syncable::ModelTypeSet result;
  for (syncable::ModelTypeSet::Iterator i = types.First();
       i.Good(); i.Inc()) {
    sync_pb::DataTypeProgressMarker marker;
    lookup->GetDownloadProgress(i.Get(), &marker);

    if (marker.token().empty())
      result.Put(i.Get());

  }
  return result;
}
