| 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_CHANGE_LIST_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "chrome/browser/chromeos/drive/file_errors.h" | 15 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace google_apis { | 18 namespace google_apis { |
| 19 class AboutResource; | 19 class AboutResource; |
| 20 class ResourceList; | 20 class ChangeList; |
| 21 class FileList; |
| 21 } // google_apis | 22 } // google_apis |
| 22 | 23 |
| 23 namespace drive { | 24 namespace drive { |
| 24 | 25 |
| 25 class ResourceEntry; | 26 class ResourceEntry; |
| 26 | 27 |
| 27 namespace internal { | 28 namespace internal { |
| 28 | 29 |
| 29 class ResourceMetadata; | 30 class ResourceMetadata; |
| 30 | 31 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 60 private: | 61 private: |
| 61 const std::string local_id_; | 62 const std::string local_id_; |
| 62 const std::string resource_id_; | 63 const std::string resource_id_; |
| 63 const int64 changestamp_; | 64 const int64 changestamp_; |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 // Class to represent a change list. | 67 // Class to represent a change list. |
| 67 class ChangeList { | 68 class ChangeList { |
| 68 public: | 69 public: |
| 69 ChangeList(); // For tests. | 70 ChangeList(); // For tests. |
| 70 explicit ChangeList(const google_apis::ResourceList& resource_list); | 71 explicit ChangeList(const google_apis::ChangeList& change_list); |
| 72 explicit ChangeList(const google_apis::FileList& file_list); |
| 71 ~ChangeList(); | 73 ~ChangeList(); |
| 72 | 74 |
| 73 const std::vector<ResourceEntry>& entries() const { return entries_; } | 75 const std::vector<ResourceEntry>& entries() const { return entries_; } |
| 74 std::vector<ResourceEntry>* mutable_entries() { return &entries_; } | 76 std::vector<ResourceEntry>* mutable_entries() { return &entries_; } |
| 75 const std::vector<std::string>& parent_resource_ids() const { | 77 const std::vector<std::string>& parent_resource_ids() const { |
| 76 return parent_resource_ids_; | 78 return parent_resource_ids_; |
| 77 } | 79 } |
| 78 std::vector<std::string>* mutable_parent_resource_ids() { | 80 std::vector<std::string>* mutable_parent_resource_ids() { |
| 79 return &parent_resource_ids_; | 81 return &parent_resource_ids_; |
| 80 } | 82 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 ParentResourceIdMap parent_resource_id_map_; | 154 ParentResourceIdMap parent_resource_id_map_; |
| 153 std::set<base::FilePath> changed_dirs_; | 155 std::set<base::FilePath> changed_dirs_; |
| 154 | 156 |
| 155 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor); | 157 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor); |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 } // namespace internal | 160 } // namespace internal |
| 159 } // namespace drive | 161 } // namespace drive |
| 160 | 162 |
| 161 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ | 163 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ |
| OLD | NEW |