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

Unified Diff: chrome/browser/ui/omnibox/omnibox_popup_model.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/ui/omnibox/omnibox_popup_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_popup_model.cc b/chrome/browser/ui/omnibox/omnibox_popup_model.cc
index e237c286b94a8eb472d08390cf912bbf9cca4c08..9c6651e0def75357b2004e650675b53d1d9428db 100644
--- a/chrome/browser/ui/omnibox/omnibox_popup_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_popup_model.cc
@@ -159,7 +159,9 @@ void OmniboxPopupModel::SetSelectedLine(size_t line,
// eliminated and just become a call to the observer on the edit.
base::string16 keyword;
bool is_keyword_hint;
- match.GetKeywordUIState(edit_model_->profile(), &keyword, &is_keyword_hint);
+ TemplateURLService* service =
+ TemplateURLServiceFactory::GetForProfile(edit_model_->profile());
+ match.GetKeywordUIState(service, &keyword, &is_keyword_hint);
if (reset_to_default) {
edit_model_->OnPopupDataChanged(match.inline_autocompletion, NULL,
@@ -242,7 +244,9 @@ void OmniboxPopupModel::TryDeletingCurrentItem() {
gfx::Image OmniboxPopupModel::GetIconIfExtensionMatch(
const AutocompleteMatch& match) const {
Profile* profile = edit_model_->profile();
- const TemplateURL* template_url = match.GetTemplateURL(profile, false);
+ TemplateURLService* service =
+ TemplateURLServiceFactory::GetForProfile(profile);
+ const TemplateURL* template_url = match.GetTemplateURL(service, false);
if (template_url &&
(template_url->GetType() == TemplateURL::OMNIBOX_API_EXTENSION)) {
return extensions::OmniboxAPI::Get(profile)->GetOmniboxPopupIcon(
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_navigation_observer.h ('k') | chrome/browser/ui/views/frame/test_with_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698