| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |