| 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 scoped_ptr<FileMetadata> CreateFileMetadataFromFileResource( | 36 scoped_ptr<FileMetadata> CreateFileMetadataFromFileResource( |
| 37 int64 change_id, | 37 int64 change_id, |
| 38 const google_apis::FileResource& resource); | 38 const google_apis::FileResource& resource); |
| 39 scoped_ptr<FileMetadata> CreateFileMetadataFromChangeResource( | 39 scoped_ptr<FileMetadata> CreateFileMetadataFromChangeResource( |
| 40 const google_apis::ChangeResource& change); | 40 const google_apis::ChangeResource& change); |
| 41 scoped_ptr<FileMetadata> CreateDeletedFileMetadata( | 41 scoped_ptr<FileMetadata> CreateDeletedFileMetadata( |
| 42 int64 change_id, | 42 int64 change_id, |
| 43 const std::string& file_id); | 43 const std::string& file_id); |
| 44 | 44 |
| 45 // Creates a temporary file in |dir_path|. This must be called on an | 45 // Creates a temporary file in |dir_path|. This must be called on an |
| 46 // IO-allowed thread. | 46 // IO-allowed task runner, and the runner must be given as |file_task_runner|. |
| 47 webkit_blob::ScopedFile CreateTemporaryFile(); | 47 webkit_blob::ScopedFile CreateTemporaryFile( |
| 48 base::TaskRunner* file_task_runner); |
| 48 | 49 |
| 49 std::string FileKindToString(FileKind file_kind); | 50 std::string FileKindToString(FileKind file_kind); |
| 50 | 51 |
| 51 bool HasFileAsParent(const FileDetails& details, const std::string& file_id); | 52 bool HasFileAsParent(const FileDetails& details, const std::string& file_id); |
| 52 | 53 |
| 53 std::string GetMimeTypeFromTitle(const base::FilePath& title); | 54 std::string GetMimeTypeFromTitle(const base::FilePath& title); |
| 54 | 55 |
| 55 scoped_ptr<google_apis::ResourceEntry> GetOldestCreatedFolderResource( | 56 scoped_ptr<google_apis::ResourceEntry> GetOldestCreatedFolderResource( |
| 56 ScopedVector<google_apis::ResourceEntry> list); | 57 ScopedVector<google_apis::ResourceEntry> list); |
| 57 | 58 |
| 58 } // namespace drive_backend | 59 } // namespace drive_backend |
| 59 } // namespace sync_file_system | 60 } // namespace sync_file_system |
| 60 | 61 |
| 61 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ | 62 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ |
| OLD | NEW |