Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1184)

Unified Diff: chrome/browser/profiles/file_path_verifier_win.cc

Issue 169093007: Modify fileAtPath stat to track if the call was redirected by chrome_elf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove beacon bits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698