summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_url_provider.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 18:21:27 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 18:21:27 +0000
commit8deeb95696562494db58140a46fbe06432f39d57 (patch)
treee74fed0de316dd2bc97805b0ba2a942fb8d53aff /chrome/browser/autocomplete/history_url_provider.cc
parent3b2a95c36e98d35b417466054349d2d5308c2af3 (diff)
downloadchromium_src-8deeb95696562494db58140a46fbe06432f39d57.zip
chromium_src-8deeb95696562494db58140a46fbe06432f39d57.tar.gz
chromium_src-8deeb95696562494db58140a46fbe06432f39d57.tar.bz2
Move |result_| and |latest_result_| to the autocomplete controller.
This purposefully does not change the communication interface between the edit and the popup; that's coming in a subsequent pass. As a result, right now the popup isn't really much simpler. That should eventually change. Review URL: http://codereview.chromium.org/6596 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_url_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 3f5a7ff..9a25e90 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -37,8 +37,7 @@ HistoryURLProviderParams::HistoryURLProviderParams(
}
void HistoryURLProvider::Start(const AutocompleteInput& input,
- bool minimal_changes,
- bool synchronous_only) {
+ bool minimal_changes) {
// NOTE: We could try hard to do less work in the |minimal_changes| case
// here; some clever caching would let us reuse the raw matches from the
// history DB without re-querying. However, we'd still have to go back to
@@ -51,7 +50,7 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
// Cancel any in-progress query.
Stop();
- RunAutocompletePasses(input, true, !synchronous_only);
+ RunAutocompletePasses(input, true);
}
void HistoryURLProvider::Stop() {
@@ -99,7 +98,7 @@ void HistoryURLProvider::DeleteMatch(const AutocompleteMatch& match) {
// out from under us on the other thread after we set params_->cancel here.
AutocompleteInput input(params_->input);
params_->cancel = true;
- RunAutocompletePasses(input, false, true);
+ RunAutocompletePasses(input, false);
}
}
@@ -577,8 +576,7 @@ void HistoryURLProvider::EnsureMatchPresent(
}
void HistoryURLProvider::RunAutocompletePasses(const AutocompleteInput& input,
- bool fixup_input_and_run_pass_1,
- bool run_pass_2) {
+ bool fixup_input_and_run_pass_1) {
matches_.clear();
if ((input.type() != AutocompleteInput::UNKNOWN) &&
@@ -650,7 +648,7 @@ void HistoryURLProvider::RunAutocompletePasses(const AutocompleteInput& input,
// Pass 2: Ask the history service to call us back on the history thread,
// where we can read the full on-disk DB.
- if (run_pass_2) {
+ if (!input.synchronous_only()) {
done_ = false;
params_ = params.release(); // This object will be destroyed in
// QueryComplete() once we're done with it.