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

Unified Diff: base/file_util_win.cc

Issue 6660001: Getting service process on Mac to handle having things moved/changed underneath it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up phajdan's comments, got things working properly Created 9 years, 9 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: base/file_util_win.cc
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 2c26a16e825b477d63582323a1942be5195703b0..f810ba9b5bdd0445de7c0e4757ab6fe44d831762 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -680,6 +680,17 @@ bool CreateDirectory(const FilePath& full_path) {
}
}
+bool AreReferringToSameObject(const FilePath& a, const FilePath& b) {
+ FilePath normal_a;
+ FilePath normal_b;
+ if (file_util::NormalizeFilePath(a, &normal_a)) {
+ if (file_util::NormalizeFilePath(b, &normal_b)) {
+ return normal_a == normal_b;
+ }
+ }
+ return false;
+}
+
bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) {
base::ThreadRestrictions::AssertIOAllowed();

Powered by Google App Engine
This is Rietveld 408576698