0

file_system_provider: remove FileBrowser.Diversion metrics

Diversion launched some time ago. The metrics are no longer needed.

Bug: b/398847594
Bug: b/398847628
Test: CQ
Change-Id: I47be9674bdaa9cbbedc1efc428c412e556342e0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396176
Commit-Queue: Nigel Tao <nigeltao@chromium.org>
Reviewed-by: François Degros <fdegros@chromium.org>
Commit-Queue: François Degros <fdegros@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1437948}
This commit is contained in:
Nigel Tao
2025-03-25 22:50:03 -07:00
committed by Chromium LUCI CQ
parent 6b068b163a
commit 32ded76ab4
2 changed files with 0 additions and 78 deletions
chrome/browser/ash/fileapi
tools/metrics/histograms/metadata/file

@ -4,12 +4,7 @@
#include "chrome/browser/ash/fileapi/diversion_backend_delegate.h"
#include <unistd.h>
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/ash/fileapi/copy_from_fd.h"
#include "chrome/browser/ash/fusebox/fusebox_errno.h"
#include "chrome/browser/ash/fusebox/fusebox_histograms.h"
#include "content/public/browser/browser_thread.h"
#include "storage/browser/file_system/file_system_url.h"
#include "storage/common/file_system/file_system_util.h"
@ -51,25 +46,6 @@ DuplicateFileSystemOperationContext(
original.file_system_context(), original.task_runner());
}
storage::AsyncFileUtil::StatusCallback HistogramWrap(
const char* histogram_name,
storage::AsyncFileUtil::StatusCallback callback) {
static constexpr auto func =
[](const char* histogram_name,
storage::AsyncFileUtil::StatusCallback wrappee,
base::File::Error error) {
base::UmaHistogramEnumeration(histogram_name,
fusebox::GetHistogramEnumPosixErrorCode(
fusebox::FileErrorToErrno(error)));
if (wrappee) {
std::move(wrappee).Run(error);
}
};
return base::BindOnce(func, histogram_name, std::move(callback));
}
} // namespace
DiversionBackendDelegate::DiversionBackendDelegate(
@ -150,9 +126,6 @@ void DiversionBackendDelegate::EnsureFileExists(
return;
}
const Policy policy = ShouldDivert(url);
base::UmaHistogramBoolean(
"FileBrowser.Diversion.EnsureFileExists.ShouldDivert",
policy != Policy::kDoNotDivert);
if (policy == Policy::kDoNotDivert) {
af_util->EnsureFileExists(std::move(context), url, std::move(callback));
return;
@ -473,27 +446,6 @@ void DiversionBackendDelegate::OnDiversionFinished(
CHECK(dest_url.is_valid());
CHECK(src_url.is_valid());
switch (stopped_reason) {
case DiversionFileManager::StoppedReason::kExplicitFinish:
base::UmaHistogramEnumeration(
"FileBrowser.Diversion.Commit.ExplicitFinish.PartOne",
fusebox::GetHistogramEnumPosixErrorCode(
fusebox::FileErrorToErrno(error)));
callback =
HistogramWrap("FileBrowser.Diversion.Commit.ExplicitFinish.PartTwo",
std::move(callback));
break;
case DiversionFileManager::StoppedReason::kImplicitIdle:
base::UmaHistogramEnumeration(
"FileBrowser.Diversion.Commit.ImplicitIdle.PartOne",
fusebox::GetHistogramEnumPosixErrorCode(
fusebox::FileErrorToErrno(error)));
callback =
HistogramWrap("FileBrowser.Diversion.Commit.ImplicitIdle.PartTwo",
std::move(callback));
break;
}
if (error != base::File::FILE_OK) {
if (callback) {
std::move(callback).Run(error);

@ -322,36 +322,6 @@ chromium-metrics-reviews@google.com.
<token key="RootType" variants="VolumeManagerRootType"/>
</histogram>
<histogram name="FileBrowser.Diversion.Commit.{Reason}.{Part}"
enum="FuseboxPosixErrorCode" expires_after="2025-04-06">
<owner>simmonsjosh@google.com</owner>
<owner>src/ui/file_manager/OWNERS</owner>
<summary>
The error code returned when committing a (temporary) diversion file to its
(persistent) backing file system, broken down by whether we stopped because
of an explicit finish (e.g. the shadowed file was renamed) or an idle
timeout. There are two parts to the diversion process. The first part
concerns any errors when reading from or writing to the work-in-progress
temporary file. The second part concerns moving the now-complete temporary
file to the backing file system.
</summary>
<token key="Reason" variants="DiversionStoppedReason"/>
<token key="Part">
<variant name="PartOne"/>
<variant name="PartTwo"/>
</token>
</histogram>
<histogram name="FileBrowser.Diversion.EnsureFileExists.ShouldDivert"
enum="Boolean" expires_after="2025-04-06">
<owner>simmonsjosh@google.com</owner>
<owner>src/ui/file_manager/OWNERS</owner>
<summary>
Whether we should start redirecting I/O to a diversion file, whenever
DiversionBackendDelegate::EnsureFileExists is called.
</summary>
</histogram>
<histogram name="FileBrowser.DownloadDestination.IsGoogleDrive.Changed"
enum="BooleanEnabled" expires_after="2025-07-01">
<owner>simmonsjosh@google.com</owner>