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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" 5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 case FILE_KIND_FILE: 123 case FILE_KIND_FILE:
124 return "file"; 124 return "file";
125 case FILE_KIND_FOLDER: 125 case FILE_KIND_FOLDER:
126 return "folder"; 126 return "folder";
127 } 127 }
128 128
129 NOTREACHED(); 129 NOTREACHED();
130 return "unknown"; 130 return "unknown";
131 } 131 }
132 132
133 bool HasFileAsParent(const FileDetails& details, const std::string& file_id) {
134 for (int i = 0; i < details.parent_folder_ids_size(); ++i) {
135 if (details.parent_folder_ids(i) == file_id)
136 return true;
137 }
138 return false;
139 }
140
133 } // namespace drive_backend 141 } // namespace drive_backend
134 } // namespace sync_file_system 142 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698