summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 18:13:33 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 18:13:33 +0000
commit8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142 (patch)
tree969478be1a6f6bf4905f7a95c5bdef91a897b1eb /chrome/browser/metrics
parentce829a60f9df9ca9655f467cdb87dd4b1604fcc1 (diff)
downloadchromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.zip
chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.gz
chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.bz2
Changes TemplateURLModel into TemplateURLService. Changes all access points to go through the newly made ProfileKeyedServiceFactory subclass.
In addition, makes further modifications to the unit testing stuff because the TemplateURL tests change the active TemplateURLService on a profile during the test. BUG=77155 TEST=unit tests R=mirandac Review URL: http://codereview.chromium.org/7056056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r--chrome/browser/metrics/metrics_service.cc10
-rw-r--r--chrome/browser/metrics/metrics_service.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 90b4c74..674f966 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -177,7 +177,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/search_engines/template_url_model.h"
+#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_switches.h"
@@ -555,7 +555,7 @@ void MetricsService::SetUpNotifications(NotificationRegistrar* registrar,
NotificationService::AllSources());
registrar->Add(observer, NotificationType::CHILD_PROCESS_CRASHED,
NotificationService::AllSources());
- registrar->Add(observer, NotificationType::TEMPLATE_URL_MODEL_LOADED,
+ registrar->Add(observer, NotificationType::TEMPLATE_URL_SERVICE_LOADED,
NotificationService::AllSources());
registrar->Add(observer, NotificationType::OMNIBOX_OPENED_URL,
NotificationService::AllSources());
@@ -621,8 +621,8 @@ void MetricsService::Observe(NotificationType type,
LogChildProcessChange(type, source, details);
break;
- case NotificationType::TEMPLATE_URL_MODEL_LOADED:
- LogKeywords(Source<TemplateURLModel>(source).ptr());
+ case NotificationType::TEMPLATE_URL_SERVICE_LOADED:
+ LogKeywords(Source<TemplateURLService>(source).ptr());
break;
case NotificationType::OMNIBOX_OPENED_URL: {
@@ -1566,7 +1566,7 @@ void MetricsService::LogBookmarks(BookmarkModel* model) {
ScheduleNextStateSave();
}
-void MetricsService::LogKeywords(const TemplateURLModel* url_model) {
+void MetricsService::LogKeywords(const TemplateURLService* url_model) {
DCHECK(url_model);
PrefService* pref = g_browser_process->local_state();
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index fb79337..cb61682 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -33,7 +33,7 @@ class HistogramSynchronizer;
class MetricsLogBase;
class MetricsReportingScheduler;
class PrefService;
-class TemplateURLModel;
+class TemplateURLService;
namespace webkit {
namespace npapi {
@@ -307,7 +307,7 @@ class MetricsService : public NotificationObserver,
// Logs keywords specific metrics. Keyword metrics are recorded in the
// profile specific metrics.
- void LogKeywords(const TemplateURLModel* url_model);
+ void LogKeywords(const TemplateURLService* url_model);
// Saves plugin-related updates from the in-object buffer to Local State
// for retrieval next time we send a Profile log (generally next launch).