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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 303233006: Abstract GoogleURLTracker & google_util Profile dependencies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix and rebase Created 6 years, 7 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/ui/navigation_correction_tab_observer.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cbca6240bba7a630bb689869f37effd2fb43b1ca..4a09d7a32ebcd286ff12247d5d09c5b27a8ff312 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/google/google_url_tracker.h"
+#include "chrome/browser/google/google_url_tracker_factory.h"
#include "chrome/browser/net/predictor.h"
#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/predictors/autocomplete_action_predictor.h"
@@ -688,8 +689,12 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition,
}
const TemplateURL* template_url = match.GetTemplateURL(profile_, false);
- if (template_url && template_url->url_ref().HasGoogleBaseURLs())
- GoogleURLTracker::GoogleURLSearchCommitted(profile_);
+ if (template_url && template_url->url_ref().HasGoogleBaseURLs()) {
+ GoogleURLTracker* tracker =
+ GoogleURLTrackerFactory::GetForProfile(profile_);
+ if (tracker)
+ tracker->SearchCommitted();
+ }
DCHECK(popup_model());
view_->OpenMatch(match, disposition, alternate_nav_url, base::string16(),
« no previous file with comments | « chrome/browser/ui/navigation_correction_tab_observer.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698