| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Finds and reads a directory by |file_path|. | 90 // Finds and reads a directory by |file_path|. |
| 91 // |callback| must not be null. | 91 // |callback| must not be null. |
| 92 // Must be called on the UI thread. | 92 // Must be called on the UI thread. |
| 93 void ReadDirectoryByPathOnUIThread(const base::FilePath& file_path, | 93 void ReadDirectoryByPathOnUIThread(const base::FilePath& file_path, |
| 94 const ReadDirectoryCallback& callback); | 94 const ReadDirectoryCallback& callback); |
| 95 | 95 |
| 96 // Synchronous version of ReadDirectoryByPathOnUIThread(). | 96 // Synchronous version of ReadDirectoryByPathOnUIThread(). |
| 97 FileError ReadDirectoryByPath(const base::FilePath& file_path, | 97 FileError ReadDirectoryByPath(const base::FilePath& file_path, |
| 98 ResourceEntryVector* out_entries); | 98 ResourceEntryVector* out_entries); |
| 99 | 99 |
| 100 // Finds and reads a directory by |id|. |
| 101 FileError ReadDirectoryById(const std::string& id, |
| 102 ResourceEntryVector* out_entries); |
| 103 |
| 100 // Replaces an existing entry with the same local ID as |entry|. | 104 // Replaces an existing entry with the same local ID as |entry|. |
| 101 FileError RefreshEntry(const ResourceEntry& entry); | 105 FileError RefreshEntry(const ResourceEntry& entry); |
| 102 | 106 |
| 103 // Recursively gets directories under the entry pointed to by |id|. | 107 // Recursively gets directories under the entry pointed to by |id|. |
| 104 void GetSubDirectoriesRecursively(const std::string& id, | 108 void GetSubDirectoriesRecursively(const std::string& id, |
| 105 std::set<base::FilePath>* sub_directories); | 109 std::set<base::FilePath>* sub_directories); |
| 106 | 110 |
| 107 // Returns the id of the resource named |base_name| directly under | 111 // Returns the id of the resource named |base_name| directly under |
| 108 // the directory with |parent_local_id|. | 112 // the directory with |parent_local_id|. |
| 109 // If not found, empty string will be returned. | 113 // If not found, empty string will be returned. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // invalidate its weak pointers before other members are destroyed. | 154 // invalidate its weak pointers before other members are destroyed. |
| 151 base::WeakPtrFactory<ResourceMetadata> weak_ptr_factory_; | 155 base::WeakPtrFactory<ResourceMetadata> weak_ptr_factory_; |
| 152 | 156 |
| 153 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata); | 157 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata); |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace internal | 160 } // namespace internal |
| 157 } // namespace drive | 161 } // namespace drive |
| 158 | 162 |
| 159 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ | 163 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ |
| OLD | NEW |