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

Unified Diff: chrome/browser/browser_main.cc

Issue 2846038: Add UMA logging of search engine selection position when the search engine lo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 50982)
+++ chrome/browser/browser_main.cc (working copy)
@@ -1406,7 +1406,7 @@
Upgrade::SaveLastModifiedTimeOfExe();
#endif
- // Record now as the last succesful chrome start.
+ // Record now as the last successful chrome start.
GoogleUpdateSettings::SetLastRunTime();
// Call Recycle() here as late as possible, before going into the loop
// because Start() will add things to it while creating the main window.
@@ -1424,12 +1424,30 @@
if (FirstRun::InSearchExperimentLocale() && record_search_engine) {
const TemplateURL* default_search_engine =
profile->GetTemplateURLModel()->GetDefaultSearchProvider();
+ // Record the search engine chosen.
if (master_prefs.run_search_engine_experiment) {
UMA_HISTOGRAM_ENUMERATION(
"Chrome.SearchSelectExperiment",
TemplateURLPrepopulateData::GetSearchEngineType(
+ default_search_engine),
+ TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
+ // If the selection has been randomized, also record the winner by slot.
+ if (master_prefs.randomize_search_engine_experiment) {
+ size_t engine_pos = profile->GetTemplateURLModel()->
+ GetSearchEngineDialogSlot();
+ if (engine_pos < 4) {
+ std::string experiment_type = "Chrome.SearchSelectExperimentSlot";
+ // Nicer in UMA if slots are 1-based.
+ experiment_type.push_back('1' + engine_pos);
+ UMA_HISTOGRAM_ENUMERATION(
+ experiment_type,
+ TemplateURLPrepopulateData::GetSearchEngineType(
default_search_engine),
- TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
+ TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
+ } else {
+ NOTREACHED() << "Invalid search engine selection slot.";
+ }
+ }
} else {
UMA_HISTOGRAM_ENUMERATION(
"Chrome.SearchSelectExempt",
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698