diff options
author | beaudoin@chromium.org <beaudoin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-16 23:58:01 +0000 |
---|---|---|
committer | beaudoin@chromium.org <beaudoin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-16 23:58:01 +0000 |
commit | 62cf8a1f8683d5788f6f4fb07e89512ee9f8f527 (patch) | |
tree | 507c1570f5070576d95955a23775884e6cd90035 | |
parent | f1cc7472027ca129e07f99b5d7978c4c5b28b62e (diff) | |
download | chromium_src-62cf8a1f8683d5788f6f4fb07e89512ee9f8f527.zip chromium_src-62cf8a1f8683d5788f6f4fb07e89512ee9f8f527.tar.gz chromium_src-62cf8a1f8683d5788f6f4fb07e89512ee9f8f527.tar.bz2 |
Add UMA stats to allow computing the average size of the TopSites blacklist per user.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/23181006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218123 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/history/top_sites_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc index c8f0466..ed97392 100644 --- a/chrome/browser/history/top_sites_impl.cc +++ b/chrome/browser/history/top_sites_impl.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/md5.h" #include "base/memory/ref_counted_memory.h" @@ -691,6 +692,13 @@ bool TopSitesImpl::AddPrepopulatedPages(MostVisitedURLList* urls) { void TopSitesImpl::ApplyBlacklist(const MostVisitedURLList& urls, MostVisitedURLList* out) { + // Log the number of times ApplyBlacklist is called so we can compute the + // average number of blacklisted items per user. + const DictionaryValue* blacklist = + profile_->GetPrefs()->GetDictionary(prefs::kNtpMostVisitedURLsBlacklist); + UMA_HISTOGRAM_BOOLEAN("TopSites.NumberOfApplyBlacklist", true); + UMA_HISTOGRAM_COUNTS_100("TopSites.NumberOfBlacklistedItems", + (blacklist ? blacklist->size() : 0)); for (size_t i = 0; i < urls.size() && i < kTopSitesNumber; ++i) { if (!IsBlacklisted(urls[i].url)) out->push_back(urls[i]); |