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

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

Issue 10790153: Changed FirstPotentialDefaultEngine histogram to log whether or not we are syncing function is call… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: init Created 8 years, 5 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 928525a0fd9e8949461ebc80f6eee449068fe468..5bdfce6fe186a2ecb7f99aa16b5855c216493302 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -93,8 +93,10 @@ const char kFirstPotentialEngineHistogramName[] =
// FirstPotentialDefaultEngine is called, and from where.
enum FirstPotentialEngineCaller {
FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP,
- FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_SYNCING,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_PROCESSING_SYNC_CHANGES,
FIRST_POTENTIAL_CALLSITE_ON_LOAD,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_SYNCING,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_NOT_SYNCING,
FIRST_POTENTIAL_CALLSITE_MAX,
};
@@ -612,13 +614,23 @@ TemplateURL* TemplateURLService::FindNewDefaultSearchProvider() {
// If not, use the first non-extension keyword of the templates that supports
// search term replacement.
if (processing_syncer_changes_) {
- UMA_HISTOGRAM_ENUMERATION(kFirstPotentialEngineHistogramName,
- FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_SYNCING,
- FIRST_POTENTIAL_CALLSITE_MAX);
+ UMA_HISTOGRAM_ENUMERATION(
+ kFirstPotentialEngineHistogramName,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_PROCESSING_SYNC_CHANGES,
+ FIRST_POTENTIAL_CALLSITE_MAX);
} else {
- UMA_HISTOGRAM_ENUMERATION(kFirstPotentialEngineHistogramName,
- FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP,
- FIRST_POTENTIAL_CALLSITE_MAX);
+ if (sync_processor_.get()) {
+ // We're not currently in a sync cycle, but we're syncing.
+ UMA_HISTOGRAM_ENUMERATION(kFirstPotentialEngineHistogramName,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_SYNCING,
+ FIRST_POTENTIAL_CALLSITE_MAX);
+ } else {
+ // We're not syncing at all.
+ UMA_HISTOGRAM_ENUMERATION(
+ kFirstPotentialEngineHistogramName,
+ FIRST_POTENTIAL_CALLSITE_FIND_NEW_DSP_NOT_SYNCING,
+ FIRST_POTENTIAL_CALLSITE_MAX);
+ }
}
return FirstPotentialDefaultEngine(template_urls_);
}
« 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