Commit ffa25e3c authored by Allen Vicencio's avatar Allen Vicencio Committed by Commit Bot

Add metrics for Remount failure in Native SMB File Share

This adds the metrics for the errors received during a failure in
Remount in Native SMB File Share

Bug: 757625
Change-Id: Ibb63eda818b0de190526b26e79a87288a13b67db
Reviewed-on: https://chromium-review.googlesource.com/1080209
Commit-Queue: Allen Vicencio <allenvic@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564808}
parent f832578e
...@@ -36,6 +36,11 @@ void RecordMountResult(SmbMountResult result) { ...@@ -36,6 +36,11 @@ void RecordMountResult(SmbMountResult result) {
UMA_HISTOGRAM_ENUMERATION("NativeSmbFileShare.MountResult", result); UMA_HISTOGRAM_ENUMERATION("NativeSmbFileShare.MountResult", result);
} }
void RecordRemountResult(SmbMountResult result) {
DCHECK_LE(result, SmbMountResult::kMaxValue);
UMA_HISTOGRAM_ENUMERATION("NativeSmbFileShare.RemountResult", result);
}
} // namespace } // namespace
SmbService::SmbService(Profile* profile) SmbService::SmbService(Profile* profile)
...@@ -189,6 +194,8 @@ void SmbService::Remount(const ProvidedFileSystemInfo& file_system_info) { ...@@ -189,6 +194,8 @@ void SmbService::Remount(const ProvidedFileSystemInfo& file_system_info) {
void SmbService::OnRemountResponse(const std::string& file_system_id, void SmbService::OnRemountResponse(const std::string& file_system_id,
smbprovider::ErrorType error) { smbprovider::ErrorType error) {
RecordRemountResult(TranslateErrorToMountResult(error));
if (error != smbprovider::ERROR_OK) { if (error != smbprovider::ERROR_OK) {
LOG(ERROR) << "SmbService: failed to restore filesystem: " LOG(ERROR) << "SmbService: failed to restore filesystem: "
<< file_system_id; << file_system_id;
......
...@@ -44935,6 +44935,15 @@ uploading your change for review. ...@@ -44935,6 +44935,15 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="NativeSmbFileShare.RemountResult"
enum="NativeSmbFileShare_MountResult">
<owner>zentaro@chromium.org</owner>
<summary>
The result of the Remount operation during startup. This is recorded after
the D-Bus call to Remount returns.
</summary>
</histogram>
<histogram name="Navigation.BackForward.CacheFlags" enum="NavigationCacheEnum"> <histogram name="Navigation.BackForward.CacheFlags" enum="NavigationCacheEnum">
<owner>clamy@chromium.org</owner> <owner>clamy@chromium.org</owner>
<summary>The cache flags set on back-forward navigations.</summary> <summary>The cache flags set on back-forward navigations.</summary>
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