| 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 COMPONENTS_DRIVE_RESOURCE_METADATA_H_ | 5 #ifndef COMPONENTS_DRIVE_RESOURCE_METADATA_H_ |
| 6 #define COMPONENTS_DRIVE_RESOURCE_METADATA_H_ | 6 #define COMPONENTS_DRIVE_RESOURCE_METADATA_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <set> | 10 #include <set> |
| 9 #include <string> | 11 #include <string> |
| 10 #include <vector> | 12 #include <vector> |
| 11 | 13 |
| 12 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
| 15 #include "components/drive/file_errors.h" | 18 #include "components/drive/file_errors.h" |
| 16 #include "components/drive/resource_metadata_storage.h" | 19 #include "components/drive/resource_metadata_storage.h" |
| 17 | 20 |
| 18 namespace base { | 21 namespace base { |
| 19 class SequencedTaskRunner; | 22 class SequencedTaskRunner; |
| 20 } | 23 } |
| 21 | 24 |
| 22 namespace drive { | 25 namespace drive { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 45 | 48 |
| 46 // Destroys this object. This method posts a task to |blocking_task_runner_| | 49 // Destroys this object. This method posts a task to |blocking_task_runner_| |
| 47 // to safely delete this object. | 50 // to safely delete this object. |
| 48 // Must be called on the UI thread. | 51 // Must be called on the UI thread. |
| 49 void Destroy(); | 52 void Destroy(); |
| 50 | 53 |
| 51 // Resets this object. | 54 // Resets this object. |
| 52 FileError Reset(); | 55 FileError Reset(); |
| 53 | 56 |
| 54 // Returns the largest changestamp. | 57 // Returns the largest changestamp. |
| 55 FileError GetLargestChangestamp(int64* out_value); | 58 FileError GetLargestChangestamp(int64_t* out_value); |
| 56 | 59 |
| 57 // Sets the largest changestamp. | 60 // Sets the largest changestamp. |
| 58 FileError SetLargestChangestamp(int64 value); | 61 FileError SetLargestChangestamp(int64_t value); |
| 59 | 62 |
| 60 // Adds |entry| to the metadata tree based on its parent_local_id. | 63 // Adds |entry| to the metadata tree based on its parent_local_id. |
| 61 FileError AddEntry(const ResourceEntry& entry, std::string* out_id); | 64 FileError AddEntry(const ResourceEntry& entry, std::string* out_id); |
| 62 | 65 |
| 63 // Removes entry with |id| from its parent. | 66 // Removes entry with |id| from its parent. |
| 64 FileError RemoveEntry(const std::string& id); | 67 FileError RemoveEntry(const std::string& id); |
| 65 | 68 |
| 66 // Finds an entry (a file or a directory) by |id|. | 69 // Finds an entry (a file or a directory) by |id|. |
| 67 FileError GetResourceEntryById(const std::string& id, | 70 FileError GetResourceEntryById(const std::string& id, |
| 68 ResourceEntry* out_entry); | 71 ResourceEntry* out_entry); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 140 |
| 138 base::ThreadChecker thread_checker_; | 141 base::ThreadChecker thread_checker_; |
| 139 | 142 |
| 140 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata); | 143 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata); |
| 141 }; | 144 }; |
| 142 | 145 |
| 143 } // namespace internal | 146 } // namespace internal |
| 144 } // namespace drive | 147 } // namespace drive |
| 145 | 148 |
| 146 #endif // COMPONENTS_DRIVE_RESOURCE_METADATA_H_ | 149 #endif // COMPONENTS_DRIVE_RESOURCE_METADATA_H_ |
| OLD | NEW |