Home | History | Annotate | Download | only in download

Lines Matching defs:DownloadQuery

195 template <typename ValueType> DownloadQuery::FilterCallback BuildFilter(
199 if (!GetAs(value, &cpp_value)) return DownloadQuery::FilterCallback();
213 DownloadQuery::FilterCallback BuildRegexFilter(
217 if (!GetAs(regex_value, &regex_str)) return DownloadQuery::FilterCallback();
219 if (!pattern->ok()) return DownloadQuery::FilterCallback();
240 DownloadQuery::DownloadQuery()
244 DownloadQuery::~DownloadQuery() {
249 // discarding items for which any filter returns false. A DownloadQuery may have
252 bool DownloadQuery::AddFilter(const DownloadQuery::FilterCallback& value) {
258 void DownloadQuery::AddFilter(DownloadItem::DownloadState state) {
263 void DownloadQuery::AddFilter(DownloadDangerType danger) {
268 bool DownloadQuery::AddFilter(DownloadQuery::FilterType type,
317 bool DownloadQuery::Matches(const DownloadItem& item) const {
335 // DownloadComparator compares GetId. A DownloadQuery may have zero or more
338 struct DownloadQuery::Sorter {
343 static Sorter Build(DownloadQuery::SortDirection adirection,
349 Sorter(DownloadQuery::SortDirection adirection,
356 DownloadQuery::SortDirection direction;
360 class DownloadQuery::DownloadComparator {
362 explicit DownloadComparator(const DownloadQuery::SorterVector& terms)
370 const DownloadQuery::SorterVector& terms_;
375 bool DownloadQuery::DownloadComparator::operator() (
377 for (DownloadQuery::SorterVector::const_iterator term = terms_.begin();
380 case LT: return term->direction == DownloadQuery::ASCENDING;
381 case GT: return term->direction == DownloadQuery::DESCENDING;
389 void DownloadQuery::AddSorter(DownloadQuery::SortType type,
390 DownloadQuery::SortDirection direction) {
434 void DownloadQuery::FinishSearch(DownloadQuery::DownloadVector* results) const {