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

Side by Side Diff: components/sync/syncable/syncable_write_transaction.cc

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "components/sync/syncable/syncable_write_transaction.h" 5 #include "components/sync/syncable/syncable_write_transaction.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "components/sync/syncable/directory.h" 9 #include "components/sync/syncable/directory.h"
10 #include "components/sync/syncable/directory_change_delegate.h" 10 #include "components/sync/syncable/directory_change_delegate.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 void WriteTransaction::NotifyTransactionComplete( 121 void WriteTransaction::NotifyTransactionComplete(
122 ModelTypeSet models_with_changes) { 122 ModelTypeSet models_with_changes) {
123 directory_->kernel()->delegate->HandleTransactionCompleteChangeEvent( 123 directory_->kernel()->delegate->HandleTransactionCompleteChangeEvent(
124 models_with_changes); 124 models_with_changes);
125 } 125 }
126 126
127 void WriteTransaction::UpdateTransactionVersion( 127 void WriteTransaction::UpdateTransactionVersion(
128 const std::vector<int64_t>& entry_changed) { 128 const std::vector<int64_t>& entry_changed) {
129 syncer::ModelTypeSet type_seen; 129 ModelTypeSet type_seen;
130 for (uint32_t i = 0; i < entry_changed.size(); ++i) { 130 for (uint32_t i = 0; i < entry_changed.size(); ++i) {
131 MutableEntry entry(this, GET_BY_HANDLE, entry_changed[i]); 131 MutableEntry entry(this, GET_BY_HANDLE, entry_changed[i]);
132 if (entry.good()) { 132 if (entry.good()) {
133 ModelType type = GetModelTypeFromSpecifics(entry.GetSpecifics()); 133 ModelType type = GetModelTypeFromSpecifics(entry.GetSpecifics());
134 if (type < FIRST_REAL_MODEL_TYPE) 134 if (type < FIRST_REAL_MODEL_TYPE)
135 continue; 135 continue;
136 if (!type_seen.Has(type)) { 136 if (!type_seen.Has(type)) {
137 directory_->IncrementTransactionVersion(type); 137 directory_->IncrementTransactionVersion(type);
138 type_seen.Put(type); 138 type_seen.Put(type);
139 } 139 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 ENUM_CASE(SYNCAPI); 185 ENUM_CASE(SYNCAPI);
186 } 186 }
187 NOTREACHED(); 187 NOTREACHED();
188 return std::string(); 188 return std::string();
189 } 189 }
190 190
191 #undef ENUM_CASE 191 #undef ENUM_CASE
192 192
193 } // namespace syncable 193 } // namespace syncable
194 } // namespace syncer 194 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/syncable/syncable_read_transaction.h ('k') | components/sync/test/engine/fake_sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698