| 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 #include "components/sync/syncable/syncable_delete_journal.h" | 5 #include "components/sync/syncable/syncable_delete_journal.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "components/sync/base/model_type.h" | 11 #include "components/sync/base/model_type.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 namespace syncable { | 14 namespace syncable { |
| 15 | 15 |
| 16 DeleteJournal::DeleteJournal(JournalIndex* initial_journal) { | 16 DeleteJournal::DeleteJournal(JournalIndex* initial_journal) { |
| 17 CHECK(initial_journal); | 17 CHECK(initial_journal); |
| 18 delete_journals_.swap(*initial_journal); | 18 delete_journals_.swap(*initial_journal); |
| 19 } | 19 } |
| 20 | 20 |
| 21 DeleteJournal::~DeleteJournal() { | 21 DeleteJournal::~DeleteJournal() { |
| 22 STLDeleteElements(&delete_journals_); | 22 base::STLDeleteElements(&delete_journals_); |
| 23 } | 23 } |
| 24 | 24 |
| 25 size_t DeleteJournal::GetDeleteJournalSize(BaseTransaction* trans) const { | 25 size_t DeleteJournal::GetDeleteJournalSize(BaseTransaction* trans) const { |
| 26 DCHECK(trans); | 26 DCHECK(trans); |
| 27 return delete_journals_.size(); | 27 return delete_journals_.size(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void DeleteJournal::UpdateDeleteJournalForServerDelete( | 30 void DeleteJournal::UpdateDeleteJournalForServerDelete( |
| 31 BaseTransaction* trans, | 31 BaseTransaction* trans, |
| 32 bool was_deleted, | 32 bool was_deleted, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 switch (type) { | 139 switch (type) { |
| 140 case BOOKMARKS: | 140 case BOOKMARKS: |
| 141 return true; | 141 return true; |
| 142 default: | 142 default: |
| 143 return false; | 143 return false; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace syncable | 147 } // namespace syncable |
| 148 } // namespace syncer | 148 } // namespace syncer |
| OLD | NEW |