diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-09 17:34:17 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-09 17:34:17 +0000 |
commit | 9333f1812b353233e6c492a6dfe7efb3a03717a3 (patch) | |
tree | bc8701a2588eb73d9773a6a24e052c9c7d28e3a4 /chrome/browser/autocomplete/history_contents_provider.cc | |
parent | 775cfd76d4523b8e932e98214c0b082e20385544 (diff) | |
download | chromium_src-9333f1812b353233e6c492a6dfe7efb3a03717a3.zip chromium_src-9333f1812b353233e6c492a6dfe7efb3a03717a3.tar.gz chromium_src-9333f1812b353233e6c492a6dfe7efb3a03717a3.tar.bz2 |
Moves some utility functions out of bookmark model into
bookmark_utils. In addition I've converted to using
TreeNodeIterator. This doesn't contain any functionality changes.
BUG=4065
TEST=none
Review URL: http://codereview.chromium.org/13642
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_contents_provider.cc')
-rw-r--r-- | chrome/browser/autocomplete/history_contents_provider.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc index 9eef77c..cc1598f 100644 --- a/chrome/browser/autocomplete/history_contents_provider.cc +++ b/chrome/browser/autocomplete/history_contents_provider.cc @@ -6,6 +6,7 @@ #include "base/histogram.h" #include "base/string_util.h" +#include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/history/query_parser.h" #include "chrome/browser/profile.h" #include "net/base/net_util.h" @@ -272,9 +273,9 @@ void HistoryContentsProvider::QueryBookmarks(const AutocompleteInput& input) { // empty. TimeTicks start_time = TimeTicks::Now(); - std::vector<BookmarkModel::TitleMatch> matches; - bookmark_model->GetBookmarksMatchingText(input.text(), kMaxMatchCount, - &matches); + std::vector<bookmark_utils::TitleMatch> matches; + bookmark_utils::GetBookmarksMatchingText(bookmark_model, input.text(), + kMaxMatchCount, &matches); for (size_t i = 0; i < matches.size(); ++i) AddBookmarkTitleMatchToResults(matches[i]); UMA_HISTOGRAM_TIMES(L"Omnibox.QueryBookmarksTime", @@ -282,7 +283,7 @@ void HistoryContentsProvider::QueryBookmarks(const AutocompleteInput& input) { } void HistoryContentsProvider::AddBookmarkTitleMatchToResults( - const BookmarkModel::TitleMatch& match) { + const bookmark_utils::TitleMatch& match) { history::URLResult url_result(match.node->GetURL(), match.match_positions); url_result.set_title(match.node->GetTitle()); results_.AppendURLBySwapping(&url_result); |