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

Unified Diff: chrome/browser/search_engines/template_url_service_factory.cc

Issue 366523002: Stop depending on chrome/browser/rlz/rlz.h from TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment 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/search_engines/template_url_service_factory.cc
diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc
index fa4d7f2be64798ccd33c8edd15eb0739a4a9ccc0..cc2498979675e6eac6902d42b579529b01f21fa2 100644
--- a/chrome/browser/search_engines/template_url_service_factory.cc
+++ b/chrome/browser/search_engines/template_url_service_factory.cc
@@ -6,11 +6,13 @@
#include <string>
+#include "base/bind.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_url_tracker_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
+#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
@@ -32,8 +34,17 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
// static
KeyedService* TemplateURLServiceFactory::BuildInstanceFor(
content::BrowserContext* profile) {
+ base::Closure dsp_change_callback;
+#if defined(ENABLE_RLZ)
+ dsp_change_callback =
+ base::Bind(base::IgnoreResult(&RLZTracker::RecordProductEvent),
+ rlz_lib::CHROME,
+ RLZTracker::ChromeOmnibox(),
+ rlz_lib::SET_TO_GOOGLE);
+#endif
return new TemplateURLService(static_cast<Profile*>(profile),
- g_browser_process->rappor_service());
+ g_browser_process->rappor_service(),
+ dsp_change_callback);
}
TemplateURLServiceFactory::TemplateURLServiceFactory()

Powered by Google App Engine
This is Rietveld 408576698