summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 16:59:11 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 16:59:11 +0000
commitdf772cbfe7a1b17dd7bb179c1e25780201d0b0ce (patch)
treebb2c277deb1b3ef07d04b5908e362c0ef7556478 /chrome/browser/autocomplete/autocomplete.h
parent8e0dca871966c15a08c23bfd890aad73ee3b8aa5 (diff)
downloadchromium_src-df772cbfe7a1b17dd7bb179c1e25780201d0b0ce.zip
chromium_src-df772cbfe7a1b17dd7bb179c1e25780201d0b0ce.tar.gz
chromium_src-df772cbfe7a1b17dd7bb179c1e25780201d0b0ce.tar.bz2
More work fixing miscellaneous issues in the autocomplete code, probably none of which will help my crasher :(
* Force the query to stop if the user deletes a match. This makes more sense from a UI perspective and allows some code to be simpler. * Prevent us from potentially doing a "minimal changes" match in a different profile (hard to trigger, likely no practical effects) * Remove unneeded Reset() call on a repeating timer (which will auto-reset itself) * Rename one of the notifications and move its listener to the edit, since that's who really cares about it anyway. * Make the controller's Stop(true) notify the popup via the normal observer pipeline rather than coding something special into the popup's StopAutocomplete(). * Rename |paste_and_go_controller| |synchronous_controller| and use it instead of using the main popup controller to do the synchronous query when calling URLsForDefaultMatch(). This makes things both simpler and safer. BUG=none TEST=Using the omnibox still works fine Review URL: http://codereview.chromium.org/178049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index 6002596..20697b8 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -518,7 +518,8 @@ class AutocompleteProvider
// Called to delete a match and the backing data that produced it. This
// match should not appear again in this or future queries. This can only be
- // called for matches the provider marks as deletable.
+ // called for matches the provider marks as deletable. This should only be
+ // called when no query is running.
// NOTE: Remember to call OnProviderUpdate() if matches_ is updated.
virtual void DeleteMatch(const AutocompleteMatch& match) {}
@@ -749,12 +750,11 @@ class AutocompleteController : public ACProviderListener {
// fired, they will be discarded.
//
// If |clear_result| is true, the controller will also erase the result set.
- // TODO(pkasting): This is temporary. Instead, we should keep a separate
- // result set that tracks the displayed matches.
void Stop(bool clear_result);
// Asks the relevant provider to delete |match|, and ensures observers are
- // notified of resulting changes immediately.
+ // notified of resulting changes immediately. This should only be called when
+ // no query is running.
void DeleteMatch(const AutocompleteMatch& match);
// Getters