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

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: 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 b05bf625fb2c3481cbf9b43ee6ea9f844d0c5ebd..ac445e93033b05fada4c6d9594ddfadb7407a124 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
@@ -118,5 +118,13 @@ webkit_blob::ScopedFile CreateTemporaryFile() {
base::MessageLoopProxy::current().get());
}
+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