summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_remover.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 18:14:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 18:14:28 +0000
commit89622004872be7f7ddaa24fa1694f76c7b9539b6 (patch)
tree81b8a42c7649c8cbca99d04305470ccbc1fe61fa /chrome/browser/browsing_data_remover.cc
parentb7544eef7b81458a88597419eed6617c41e6d3dc (diff)
downloadchromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.zip
chromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.tar.gz
chromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.tar.bz2
UMA cleanup. Replacing calls to RecordAction(char*) to use a new structure.
That way it is easier to keep track of those constants in reporting tools. TEST=Covered with standard ui tests Patch by Frank Mantek <fmantek@google.com>. Review URL: http://codereview.chromium.org/811005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r--chrome/browser/browsing_data_remover.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 614c781..7323444 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -94,7 +94,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (history_service) {
std::set<GURL> restrict_urls;
- UserMetrics::RecordAction("ClearBrowsingData_History", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_History"),
+ profile_);
waiting_for_clear_history_ = true;
history_service->ExpireHistoryBetween(restrict_urls,
delete_begin_, delete_end_,
@@ -127,14 +128,16 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_DOWNLOADS) {
- UserMetrics::RecordAction("ClearBrowsingData_Downloads", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads"),
+ profile_);
DownloadManager* download_manager = profile_->GetDownloadManager();
download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_);
download_manager->ClearLastDownloadPath();
}
if (remove_mask & REMOVE_COOKIES) {
- UserMetrics::RecordAction("ClearBrowsingData_Cookies", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"),
+ profile_);
// Since we are running on the UI thread don't call GetURLRequestContext().
net::CookieMonster* cookie_monster =
profile_->GetRequestContext()->GetCookieStore()->GetCookieMonster();
@@ -174,7 +177,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_PASSWORDS) {
- UserMetrics::RecordAction("ClearBrowsingData_Passwords", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords"),
+ profile_);
PasswordStore* password_store =
profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
@@ -182,7 +186,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_FORM_DATA) {
- UserMetrics::RecordAction("ClearBrowsingData_Autofill", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Autofill"),
+ profile_);
WebDataService* web_data_service =
profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
@@ -193,7 +198,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
if (remove_mask & REMOVE_CACHE) {
// Invoke ClearBrowsingDataView::ClearCache on the IO thread.
waiting_for_clear_cache_ = true;
- UserMetrics::RecordAction("ClearBrowsingData_Cache", profile_);
+ UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Cache"),
+ profile_);
URLRequestContextGetter* main_context_getter =
profile_->GetRequestContext();