| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 base::FilePath temp_file_path; | 111 base::FilePath temp_file_path; |
| 112 if (!file_util::CreateTemporaryFile(&temp_file_path)) | 112 if (!file_util::CreateTemporaryFile(&temp_file_path)) |
| 113 return webkit_blob::ScopedFile(); | 113 return webkit_blob::ScopedFile(); |
| 114 | 114 |
| 115 return webkit_blob::ScopedFile( | 115 return webkit_blob::ScopedFile( |
| 116 temp_file_path, | 116 temp_file_path, |
| 117 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT, | 117 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT, |
| 118 base::MessageLoopProxy::current().get()); | 118 base::MessageLoopProxy::current().get()); |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool HasFileAsParent(const FileDetails& details, const std::string& file_id) { |
| 122 for (int i = 0; i < details.parent_folder_ids_size(); ++i) { |
| 123 if (details.parent_folder_ids(i) == file_id) |
| 124 return true; |
| 125 } |
| 126 return false; |
| 127 } |
| 128 |
| 121 } // namespace drive_backend | 129 } // namespace drive_backend |
| 122 } // namespace sync_file_system | 130 } // namespace sync_file_system |
| OLD | NEW |