Index: chrome/browser/profiles/file_path_verifier_win.cc |
diff --git a/chrome/browser/profiles/file_path_verifier_win.cc b/chrome/browser/profiles/file_path_verifier_win.cc |
index 44d34a435bd3da2e652174c078940e8640151a0e..425a7d275f19746a468307594272ee309403b897 100644 |
--- a/chrome/browser/profiles/file_path_verifier_win.cc |
+++ b/chrome/browser/profiles/file_path_verifier_win.cc |
@@ -9,6 +9,7 @@ |
#include "base/file_util.h" |
#include "base/files/file_path.h" |
#include "base/metrics/histogram.h" |
+#include "chrome_elf/create_file/chrome_create_file.h" |
namespace { |
@@ -20,6 +21,9 @@ enum FileVerificationResult { |
FILE_VERIFICATION_FAILED_UNKNOWN, |
FILE_VERIFICATION_FAILED_SAMEBASE, |
FILE_VERIFICATION_FAILED_SAMEDIR, |
+ FILE_VERIFICATION_SUCCESS_REDIRECT, |
+ FILE_VERIFICATION_FAILED_SAMEBASE_REDIRECT, |
+ FILE_VERIFICATION_FAILED_SAMEDIR_REDIRECT, |
NUM_FILE_VERIFICATION_RESULTS |
}; |
@@ -36,15 +40,21 @@ FileVerificationResult VerifyFileAtPath(const base::FilePath& file) { |
} else { |
internal::PathComparisonReason path_comparison_reason = |
internal::ComparePathsIgnoreCase(file, normalized_path); |
+ bool was_redirected = LastCallWasRedirected(); |
gab
2014/02/18 19:43:11
LastCallWasRedirected() is a bit vague out-of-chro
Cait (Slow)
2014/02/18 23:17:18
Done.
|
switch (path_comparison_reason) { |
case internal::PATH_COMPARISON_EQUAL: |
- file_verification_result = FILE_VERIFICATION_SUCCESS; |
+ file_verification_result = was_redirected ? |
+ FILE_VERIFICATION_SUCCESS_REDIRECT : FILE_VERIFICATION_SUCCESS; |
break; |
case internal::PATH_COMPARISON_FAILED_SAMEBASE: |
- file_verification_result = FILE_VERIFICATION_FAILED_SAMEBASE; |
+ file_verification_result = was_redirected ? |
+ FILE_VERIFICATION_FAILED_SAMEBASE_REDIRECT : |
+ FILE_VERIFICATION_FAILED_SAMEBASE; |
break; |
case internal::PATH_COMPARISON_FAILED_SAMEDIR: |
- file_verification_result = FILE_VERIFICATION_FAILED_SAMEDIR; |
+ file_verification_result = was_redirected ? |
+ FILE_VERIFICATION_FAILED_SAMEDIR_REDIRECT : |
+ FILE_VERIFICATION_FAILED_SAMEDIR; |
break; |
} |
} |
@@ -77,6 +87,7 @@ PathComparisonReason ComparePathsIgnoreCase(const base::FilePath& path1, |
void VerifyPreferencesFile(const base::FilePath& pref_file_path) { |
FileVerificationResult file_verification_result = |
VerifyFileAtPath(pref_file_path); |
+ bool was_redirected = LastCallWasRedirected(); |
gab
2014/02/18 19:43:11
unused?
Cait (Slow)
2014/02/18 23:17:18
Done.
|
UMA_HISTOGRAM_ENUMERATION("Stability.FileAtPath.Preferences", |
file_verification_result, |
NUM_FILE_VERIFICATION_RESULTS); |