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-05-29 00:10:17 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 00:10:17 +0000
commit45b2e16d81eb606ecbd102ca36dc51d87298f966 (patch)
tree1b1359211be9aede274ab6f824e88402fd433960 /chrome/browser/autocomplete/autocomplete.h
parent1c0be54a98e2f801e8fa22c01aac83e36485eee4 (diff)
downloadchromium_src-45b2e16d81eb606ecbd102ca36dc51d87298f966.zip
chromium_src-45b2e16d81eb606ecbd102ca36dc51d87298f966.tar.gz
chromium_src-45b2e16d81eb606ecbd102ca36dc51d87298f966.tar.bz2
Hoist TrimHttpPrefix() so we only have one copy, not one per provider.
Make use of this in HistoryContentsProvider so results from it get their schemes trimmed appropriately. BUG=10558 Review URL: http://codereview.chromium.org/115885 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index cf40c1c..c2b8edd 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -532,6 +532,10 @@ class AutocompleteProvider
static size_t max_matches() { return max_matches_; }
protected:
+ // Trims "http:" and up to two subsequent slashes from |url|. Returns the
+ // number of characters that were trimmed.
+ static size_t TrimHttpPrefix(std::wstring* url);
+
// Updates the starred state of each of the matches in matches_ from the
// profile's bookmark bar model.
void UpdateStarredStateOfMatches();