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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc

Issue 71233003: [SyncFS] Delete local file on rename and reorganize completion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@00_completion
Patch Set: fix Created 7 years, 1 month 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/sync_file_system/drive_backend/drive_backend_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
index ac4db0a3abcf73eed610b8ba4047a1eb782e7ec8..19311ddc4fde63a701fc777e603f4127f53bd69e 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
@@ -130,5 +130,13 @@ std::string FileKindToString(FileKind file_kind) {
return "unknown";
}
+bool HasFileAsParent(const FileDetails& details, const std::string& file_id) {
+ for (int i = 0; i < details.parent_folder_ids_size(); ++i) {
+ if (details.parent_folder_ids(i) == file_id)
+ return true;
+ }
+ return false;
+}
+
} // namespace drive_backend
} // namespace sync_file_system

Powered by Google App Engine
This is Rietveld 408576698