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

Unified Diff: chrome/browser/ui/search_engines/edit_search_engine_controller.cc

Issue 1410823003: Add UMA for window.external.AddSearchProvider (Chrome side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mpearson review Created 5 years, 2 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/ui/search_engines/edit_search_engine_controller.cc
diff --git a/chrome/browser/ui/search_engines/edit_search_engine_controller.cc b/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
index 126af58d01afe94b70b0d82bd18ca0fcf0126a9c..8d974cc8b89fb641d736059e078a44364a922181 100644
--- a/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
+++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/search_engines/edit_search_engine_controller.h"
+#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -24,6 +25,9 @@ EditSearchEngineController::EditSearchEngineController(
edit_keyword_delegate_(edit_keyword_delegate),
profile_(profile) {
DCHECK(profile_);
+ UMA_HISTOGRAM_ENUMERATION("Search.AddSearchProvider",
+ CONFIRMATION_DIALOG_SHOWN,
+ NUM_EDIT_SEARCH_ENGINE_ACTIONS);
}
bool EditSearchEngineController::IsTitleValid(
@@ -112,6 +116,10 @@ void EditSearchEngineController::AcceptAddOrEdit(
edit_keyword_delegate_->OnEditedKeyword(template_url_, title_input,
keyword_input, url_string);
}
+
+ UMA_HISTOGRAM_ENUMERATION("Search.AddSearchProvider",
+ CONFIRMATION_DIALOG_CONFIRMED,
+ NUM_EDIT_SEARCH_ENGINE_ACTIONS);
}
void EditSearchEngineController::CleanUpCancelledAdd() {
@@ -121,6 +129,10 @@ void EditSearchEngineController::CleanUpCancelledAdd() {
delete template_url_;
template_url_ = NULL;
}
+
+ UMA_HISTOGRAM_ENUMERATION("Search.AddSearchProvider",
+ CONFIRMATION_DIALOG_CANCELLED,
+ NUM_EDIT_SEARCH_ENGINE_ACTIONS);
}
std::string EditSearchEngineController::GetFixedUpURL(

Powered by Google App Engine
This is Rietveld 408576698