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

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

Issue 10873075: Add a histogram to track deletes on synced search engines. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_service.cc
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index 064aabc8a7cebdbe095037a7bf00c3dda1d18d04..598f07bb48f43a4a079b97c0163f2b12cfcb6e76 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -101,6 +101,18 @@ enum FirstPotentialEngineCaller {
FIRST_POTENTIAL_CALLSITE_MAX,
};
+const char kDeleteSyncedEngineHistogramName[] =
+ "Search.DeleteSyncedSearchEngine";
+
+// Values for an enumerated histogram used to track whenever an ACTION_DELETE is
+// sent to the server for search engines.
+enum DeleteSyncedSearchEngineEvent {
+ DELETE_ENGINE_USER_ACTION,
+ DELETE_ENGINE_PRE_SYNC,
+ DELETE_ENGINE_EMPTY_FIELD,
+ DELETE_ENGINE_MAX,
+};
+
TemplateURL* FirstPotentialDefaultEngine(
const TemplateURLService::TemplateURLVector& template_urls) {
for (TemplateURLService::TemplateURLVector::const_iterator i(
@@ -1152,6 +1164,8 @@ syncer::SyncError TemplateURLService::MergeDataAndStartSyncing(
syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_DELETE,
iter->second));
+ UMA_HISTOGRAM_ENUMERATION(kDeleteSyncedEngineHistogramName,
+ DELETE_ENGINE_PRE_SYNC, DELETE_ENGINE_MAX);
continue;
}
@@ -1309,6 +1323,8 @@ TemplateURL* TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(
syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_DELETE,
sync_data));
+ UMA_HISTOGRAM_ENUMERATION(kDeleteSyncedEngineHistogramName,
+ DELETE_ENGINE_EMPTY_FIELD, DELETE_ENGINE_MAX);
return NULL;
}
@@ -2228,6 +2244,8 @@ void TemplateURLService::RemoveNoNotify(TemplateURL* template_url) {
ProcessTemplateURLChange(FROM_HERE,
template_url,
syncer::SyncChange::ACTION_DELETE);
+ UMA_HISTOGRAM_ENUMERATION(kDeleteSyncedEngineHistogramName,
+ DELETE_ENGINE_USER_ACTION, DELETE_ENGINE_MAX);
if (profile_) {
content::Source<Profile> source(profile_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698