Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: chrome/browser/autocomplete/autocomplete_result.cc

Issue 363893002: Revert of Reduces dependency from AutocompleteMatch to Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_result.cc
diff --git a/chrome/browser/autocomplete/autocomplete_result.cc b/chrome/browser/autocomplete/autocomplete_result.cc
index 664384b1624ed159fc9725c13c5ee9f15976f479..7c817a037f742b3f22ca8106a39a072d4bc61b27 100644
--- a/chrome/browser/autocomplete/autocomplete_result.cc
+++ b/chrome/browser/autocomplete/autocomplete_result.cc
@@ -132,10 +132,9 @@
AutocompleteResult::~AutocompleteResult() {}
-void AutocompleteResult::CopyOldMatches(
- const AutocompleteInput& input,
- const AutocompleteResult& old_matches,
- TemplateURLService* template_url_service) {
+void AutocompleteResult::CopyOldMatches(const AutocompleteInput& input,
+ const AutocompleteResult& old_matches,
+ Profile* profile) {
if (old_matches.empty())
return;
@@ -171,7 +170,7 @@
i->second, matches_per_provider[i->first]);
}
- SortAndCull(input, template_url_service);
+ SortAndCull(input, profile);
}
void AutocompleteResult::AppendMatches(const ACMatches& matches) {
@@ -187,11 +186,10 @@
alternate_nav_url_ = GURL();
}
-void AutocompleteResult::SortAndCull(
- const AutocompleteInput& input,
- TemplateURLService* template_url_service) {
+void AutocompleteResult::SortAndCull(const AutocompleteInput& input,
+ Profile* profile) {
for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i)
- i->ComputeStrippedDestinationURL(template_url_service);
+ i->ComputeStrippedDestinationURL(profile);
DedupMatchesByDestination(input.current_page_classification(), true,
&matches_);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_result.h ('k') | chrome/browser/autocomplete/autocomplete_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698