Commit f76319aa authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Retire WinJumplist.DeleteDirectoryContentDuration UMA metric

This metric is no longer needed.

Bug: 738126
Change-Id: If8baa53178238335d75ccefd8d6ae9065b2d00ad
Reviewed-on: https://chromium-review.googlesource.com/563757Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarPatrick Monette <pmonette@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485355}
parent 5cb93e73
......@@ -841,7 +841,7 @@ int JumpList::UpdateIconFiles(const base::FilePath& icon_dir,
// closed" category updates for the 1st time after Chrome is launched.
// 2) The number of icons in |icon_dir| has exceeded the limit.
if (icon_cur->empty() || FilesExceedLimitInDir(icon_dir, max_items * 2)) {
DeleteDirectoryContentAndLogRuntime(icon_dir, kFileDeleteLimit);
DeleteDirectoryContent(icon_dir, kFileDeleteLimit);
icon_cur->clear();
icon_next->clear();
// Create new icons only when the directory exists and is empty.
......
......@@ -83,13 +83,6 @@ void DeleteDirectory(const base::FilePath& path, int max_file_deleted) {
::RemoveDirectory(path.value().c_str());
}
void DeleteDirectoryContentAndLogRuntime(const base::FilePath& path,
int max_file_deleted) {
SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.DeleteDirectoryContentDuration");
DeleteDirectoryContent(path, kFileDeleteLimit);
}
bool FilesExceedLimitInDir(const base::FilePath& path, int max_files) {
int count = 0;
base::FileEnumerator file_iter(path, false, base::FileEnumerator::FILES);
......
......@@ -34,12 +34,6 @@ void DeleteDirectoryContent(const base::FilePath& path, int max_file_deleted);
// |path|. If |path| is empty after the call, it is removed.
void DeleteDirectory(const base::FilePath& path, int max_file_deleted);
// Deletes the content in the folder at |path| and records the runtime to UMA.
// TODO(chengx): Remove this method and use DeleteDirectoryContent after fixing
// http://crbug.com/40407.
void DeleteDirectoryContentAndLogRuntime(const base::FilePath& path,
int max_file_deleted);
// Returns true if the directory at |path| has more than |max_files| files.
// Sub-directories are not taken into account here.
bool FilesExceedLimitInDir(const base::FilePath& path, int max_files);
......
......@@ -87850,6 +87850,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="WinJumplist.DeleteDirectoryContentDuration" units="ms">
<obsolete>
Obsolete 07/06/2016 as we are no long recording this metric.
</obsolete>
<owner>chengx@chromium.org</owner>
<summary>Time spent in DeleteDirectoryContentAndLogRuntime().</summary>
</histogram>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment