Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: sync/syncable/syncable_delete_journal.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sync/syncable/syncable_delete_journal.h ('k') | sync/syncable/syncable_enum_conversions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "sync/syncable/syncable_delete_journal.h" 5 #include "sync/syncable/syncable_delete_journal.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include "base/stl_util.h" 10 #include "base/stl_util.h"
8 #include "sync/internal_api/public/base/model_type.h" 11 #include "sync/internal_api/public/base/model_type.h"
9 12
10 namespace syncer { 13 namespace syncer {
11 namespace syncable { 14 namespace syncable {
12 15
13 DeleteJournal::DeleteJournal(JournalIndex* initial_journal) { 16 DeleteJournal::DeleteJournal(JournalIndex* initial_journal) {
14 CHECK(initial_journal); 17 CHECK(initial_journal);
15 delete_journals_.swap(*initial_journal); 18 delete_journals_.swap(*initial_journal);
16 } 19 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 79 }
77 } 80 }
78 passive_delete_journal_types_.Put(type); 81 passive_delete_journal_types_.Put(type);
79 } 82 }
80 83
81 void DeleteJournal::PurgeDeleteJournals(BaseTransaction* trans, 84 void DeleteJournal::PurgeDeleteJournals(BaseTransaction* trans,
82 const MetahandleSet& to_purge) { 85 const MetahandleSet& to_purge) {
83 DCHECK(trans); 86 DCHECK(trans);
84 JournalIndex::iterator it = delete_journals_.begin(); 87 JournalIndex::iterator it = delete_journals_.begin();
85 while (it != delete_journals_.end()) { 88 while (it != delete_journals_.end()) {
86 int64 handle = (*it)->ref(META_HANDLE); 89 int64_t handle = (*it)->ref(META_HANDLE);
87 if (to_purge.count(handle)) { 90 if (to_purge.count(handle)) {
88 delete *it; 91 delete *it;
89 delete_journals_.erase(it++); 92 delete_journals_.erase(it++);
90 } else { 93 } else {
91 ++it; 94 ++it;
92 } 95 }
93 } 96 }
94 delete_journals_to_purge_.insert(to_purge.begin(), to_purge.end()); 97 delete_journals_to_purge_.insert(to_purge.begin(), to_purge.end());
95 } 98 }
96 99
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 switch (type) { 137 switch (type) {
135 case BOOKMARKS: 138 case BOOKMARKS:
136 return true; 139 return true;
137 default: 140 default:
138 return false; 141 return false;
139 } 142 }
140 } 143 }
141 144
142 } // namespace syncable 145 } // namespace syncable
143 } // namespace syncer 146 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/syncable_delete_journal.h ('k') | sync/syncable/syncable_enum_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698