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

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: 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..976ecf519d78df3781bfaa49567c097df915c92c 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,19 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
// static
KeyedService* TemplateURLServiceFactory::BuildInstanceFor(
content::BrowserContext* profile) {
- return new TemplateURLService(static_cast<Profile*>(profile),
- g_browser_process->rappor_service());
+ TemplateURLService* service = new TemplateURLService(
+ static_cast<Profile*>(profile),
+ g_browser_process->rappor_service());
+
+#if defined(ENABLE_RLZ)
+ service->set_dsp_changed_to_google_event_recorder(
Peter Kasting 2014/07/01 18:19:08 If we're going to call this at the same time we co
hashimoto 2014/07/01 23:24:49 Done.
+ base::Bind(base::IgnoreResult(&RLZTracker::RecordProductEvent),
+ rlz_lib::CHROME,
+ RLZTracker::ChromeOmnibox(),
+ rlz_lib::SET_TO_GOOGLE));
+#endif
+
+ return service;
}
TemplateURLServiceFactory::TemplateURLServiceFactory()

Powered by Google App Engine
This is Rietveld 408576698