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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.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/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 9cc2394b5034eb4a2d4750046581f7f567cb035f..0d81e3c6b5e8c334a32c7979b98402e48a180fb3 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -687,9 +687,7 @@
match.transition = content::PAGE_TRANSITION_LINK;
}
- TemplateURLService* service =
- TemplateURLServiceFactory::GetForProfile(profile_);
- const TemplateURL* template_url = match.GetTemplateURL(service, false);
+ const TemplateURL* template_url = match.GetTemplateURL(profile_, false);
if (template_url && template_url->url_ref().HasGoogleBaseURLs(
UIThreadSearchTermsData(profile_))) {
GoogleURLTracker* tracker =
@@ -786,9 +784,7 @@
<< "An omnibox focus should have occurred before opening a match.";
UMA_HISTOGRAM_TIMES(kFocusToOpenTimeHistogram, now - last_omnibox_focus_);
- TemplateURLService* service =
- TemplateURLServiceFactory::GetForProfile(profile_);
- TemplateURL* template_url = match.GetTemplateURL(service, false);
+ TemplateURL* template_url = match.GetTemplateURL(profile_, false);
if (template_url) {
if (match.transition == content::PAGE_TRANSITION_KEYWORD) {
// The user is using a non-substituting keyword or is explicitly in
@@ -1269,9 +1265,7 @@
// OnPopupDataChanged use their previous state to detect changes.
base::string16 keyword;
bool is_keyword_hint;
- TemplateURLService* service =
- TemplateURLServiceFactory::GetForProfile(profile_);
- match.GetKeywordUIState(service, &keyword, &is_keyword_hint);
+ match.GetKeywordUIState(profile_, &keyword, &is_keyword_hint);
if (popup_model())
popup_model()->OnResultChanged();
// OnPopupDataChanged() resets OmniboxController's |current_match_| early
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_controller.cc ('k') | chrome/browser/ui/omnibox/omnibox_navigation_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698