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

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

Issue 354773002: Reduces dependency from AutocompleteMatch to Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/shortcuts_provider.cc
diff --git a/chrome/browser/autocomplete/shortcuts_provider.cc b/chrome/browser/autocomplete/shortcuts_provider.cc
index 94192c4ef2206e2703eceea9a12f262825434d1c..bdd1fd5012cb659e109b0a5a48e9593c9fbb84c2 100644
--- a/chrome/browser/autocomplete/shortcuts_provider.cc
+++ b/chrome/browser/autocomplete/shortcuts_provider.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/omnibox/omnibox_field_trial.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/autocomplete/url_prefix.h"
@@ -158,7 +159,8 @@ void ShortcutsProvider::GetMatches(const AutocompleteInput& input) {
if (relevance) {
matches_.push_back(ShortcutToACMatch(it->second, relevance, input,
fixed_up_input, input_as_gurl));
- matches_.back().ComputeStrippedDestinationURL(profile_);
+ matches_.back().ComputeStrippedDestinationURL(
+ TemplateURLServiceFactory::GetForProfile(profile_));
}
}
// Remove duplicates. Duplicates don't need to be preserved in the matches

Powered by Google App Engine
This is Rietveld 408576698