Skip to content

Commit

Permalink
Retire ImportantFile.DeleteOnCloseError histogram.
Browse files Browse the repository at this point in the history
It tells us that failures are due to I/O errors, access denied errors,
and other things we can't do anything about (likely odd drivers, too).

R=chromium-metrics-reviews@google.com, gab@chromium.org

Bug: 1156213
Change-Id: If4fb97d44d8b9a59db48239c68e69a56f59cd462
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2609143
Commit-Queue: Greg Thompson <grt@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841442}
  • Loading branch information
GregTho authored and Chromium LUCI CQ committed Jan 8, 2021
1 parent 776d920 commit cd7b7fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 3 additions & 6 deletions base/files/important_file_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,9 @@ void DeleteTmpFileWithRetry(File tmp_file,
if (tmp_file.IsValid()) {
if (tmp_file.DeleteOnClose(true))
return;
// The file was opened with exclusive r/w access, so it would be very odd
// for this to fail.
UmaHistogramExactLinearWithSuffix(
"ImportantFile.DeleteOnCloseError", histogram_suffix,
-File::GetLastFileError(), -File::FILE_ERROR_MAX);
// Go ahead and close the file. The call to DeleteFile below will basically
// The file was opened with exclusive r/w access, so failures are primarily
// due to I/O errors or other phenomena out of the process's control. Go
// ahead and close the file. The call to DeleteFile below will basically
// repeat the above, but maybe it will somehow succeed.
tmp_file.Close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6793,7 +6793,10 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</histogram>

<histogram name="ImportantFile.DeleteOnCloseError" enum="PlatformFileError"
expires_after="2021-01-19">
expires_after="M89">
<obsolete>
Removed in M89.
</obsolete>
<owner>grt@chromium.org</owner>
<owner>xaerox@yandex-team.ru</owner>
<summary>
Expand Down

0 comments on commit cd7b7fd

Please sign in to comment.