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

Unified Diff: chrome/browser/browsing_data_remover.cc

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to content namespace. Update usages. Update extract_actions tool. Created 9 years 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/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 8a2a8d069eb03097f7d9616e1a2e31d77b12e97f..1491fdfa3eb7cce637e8d184476bd3f3974816d9 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -43,10 +43,10 @@
#include "chrome/common/url_constants.h"
#include "content/browser/download/download_manager.h"
#include "content/browser/in_process_webkit/webkit_context.h"
-#include "content/browser/user_metrics.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/plugin_data_remover.h"
+#include "content/public/browser/user_metrics.h"
#include "net/base/cookie_monster.h"
#include "net/base/net_errors.h"
#include "net/base/transport_security_state.h"
@@ -58,6 +58,7 @@
#include "webkit/quota/quota_types.h"
using content::BrowserThread;
+using content::UserMetricsAction;
// Done so that we can use PostTask on BrowsingDataRemovers and not have
// BrowsingDataRemover implement RefCounted.
@@ -130,7 +131,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (history_service) {
std::set<GURL> restrict_urls;
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_History"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_History"));
waiting_for_clear_history_ = true;
history_service->ExpireHistoryBetween(restrict_urls,
delete_begin_, delete_end_,
@@ -188,7 +189,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_DOWNLOADS) {
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads"));
DownloadManager* download_manager =
DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager();
download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_);
@@ -196,7 +197,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_COOKIES) {
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
// Since we are running on the UI thread don't call GetURLRequestContext().
net::URLRequestContextGetter* rq_context = profile_->GetRequestContext();
if (rq_context) {
@@ -233,7 +234,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_LSO_DATA) {
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_LSOData"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_LSOData"));
waiting_for_clear_lso_data_ = true;
if (!plugin_data_remover_.get()) {
@@ -246,7 +247,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_PASSWORDS) {
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords"));
PasswordStore* password_store =
profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
@@ -255,7 +256,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
}
if (remove_mask & REMOVE_FORM_DATA) {
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Autofill"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_Autofill"));
WebDataService* web_data_service =
profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
@@ -278,7 +279,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
// Invoke DoClearCache on the IO thread.
waiting_for_clear_cache_ = true;
- UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_Cache"));
+ content::RecordAction(UserMetricsAction("ClearBrowsingData_Cache"));
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698