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

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

Issue 7321001: Changes SearchProvider to set the description of the first consecutive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK Created 9 years, 5 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
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/autocomplete_match.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 048bea2dc8378cb3b6cb68c514f5e1c9e7c69e0a..5d27978fbd3dab6f8d99ca66b1323b3d54a61287 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -469,21 +469,14 @@ void AutocompleteEditModel::AcceptInput(WindowOpenDisposition disposition,
match.transition = PageTransition::LINK;
}
- if (match.type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED ||
- match.type == AutocompleteMatch::SEARCH_HISTORY ||
- match.type == AutocompleteMatch::SEARCH_SUGGEST) {
- const TemplateURL* default_provider =
- TemplateURLServiceFactory::GetForProfile(profile_)->
- GetDefaultSearchProvider();
- if (default_provider && default_provider->url() &&
- default_provider->url()->HasGoogleBaseURLs()) {
- GoogleURLTracker::GoogleURLSearchCommitted();
+ if (match.template_url && match.template_url->url() &&
+ match.template_url->url()->HasGoogleBaseURLs()) {
+ GoogleURLTracker::GoogleURLSearchCommitted();
#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
- // TODO(pastarmovj): Remove these metrics once we have proven that (close
- // to) none searches that should have RLZ are sent out without one.
- default_provider->url()->CollectRLZMetrics();
+ // TODO(pastarmovj): Remove these metrics once we have proven that (close
+ // to) none searches that should have RLZ are sent out without one.
+ match.template_url->url()->CollectRLZMetrics();
#endif
- }
}
view_->OpenMatch(match, disposition, alternate_nav_url,
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/autocomplete_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698