| Index: components/bookmarks/browser/typed_count_sorter.h
|
| diff --git a/components/bookmarks/browser/typed_count_sorter.h b/components/bookmarks/browser/typed_count_sorter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..eabe0091bf3dd694fb499a4634ae0982c1c04fd9
|
| --- /dev/null
|
| +++ b/components/bookmarks/browser/typed_count_sorter.h
|
| @@ -0,0 +1,34 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_BOOKMARKS_BROWSER_TYPED_COUNT_SORTER_H_
|
| +#define COMPONENTS_BOOKMARKS_BROWSER_TYPED_COUNT_SORTER_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/bookmarks/browser/titled_url_node_sorter.h"
|
| +
|
| +namespace bookmarks {
|
| +
|
| +class BookmarkClient;
|
| +
|
| +class TypedCountSorter : public TitledUrlNodeSorter {
|
| + public:
|
| + TypedCountSorter(BookmarkClient* client);
|
| + ~TypedCountSorter();
|
| +
|
| + // Constructs |sorted_nodes| by taking the matches in |matches| and sorting
|
| + // them in decreasing order of typed count (if supported by the client) and
|
| + // deduping them.
|
| + void SortMatches(const TitledUrlNodeSet& matches,
|
| + TitledUrlNodes* sorted_nodes) const override;
|
| +
|
| + private:
|
| + BookmarkClient* client_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TypedCountSorter);
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif // COMPONENTS_BOOKMARKS_BROWSER_TYPED_COUNT_SORTER_H_
|
|
|