| 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_FILE_CHANGE_H_ | 5 #ifndef COMPONENTS_DRIVE_FILE_CHANGE_H_ |
| 6 #define COMPONENTS_DRIVE_FILE_CHANGE_H_ | 6 #define COMPONENTS_DRIVE_FILE_CHANGE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 private: | 52 private: |
| 53 ChangeType change_; | 53 ChangeType change_; |
| 54 FileType file_type_; | 54 FileType file_type_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 class ChangeList { | 57 class ChangeList { |
| 58 public: | 58 public: |
| 59 typedef std::deque<Change> List; | 59 typedef std::deque<Change> List; |
| 60 | 60 |
| 61 ChangeList(); | 61 ChangeList(); |
| 62 ChangeList(const ChangeList& other); |
| 62 ~ChangeList(); | 63 ~ChangeList(); |
| 63 | 64 |
| 64 // Updates the list with the |new_change|. | 65 // Updates the list with the |new_change|. |
| 65 void Update(const Change& new_change); | 66 void Update(const Change& new_change); |
| 66 | 67 |
| 67 size_t size() const { return list_.size(); } | 68 size_t size() const { return list_.size(); } |
| 68 bool empty() const { return list_.empty(); } | 69 bool empty() const { return list_.empty(); } |
| 69 void clear() { list_.clear(); } | 70 void clear() { list_.clear(); } |
| 70 const List& list() const { return list_; } | 71 const List& list() const { return list_; } |
| 71 const Change& front() const { return list_.front(); } | 72 const Change& front() const { return list_.front(); } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 110 |
| 110 std::string DebugString() const; | 111 std::string DebugString() const; |
| 111 | 112 |
| 112 private: | 113 private: |
| 113 Map map_; | 114 Map map_; |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace drive | 117 } // namespace drive |
| 117 | 118 |
| 118 #endif // COMPONENTS_DRIVE_FILE_CHANGE_H_ | 119 #endif // COMPONENTS_DRIVE_FILE_CHANGE_H_ |
| OLD | NEW |