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

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

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void WriteTransaction::NotifyTransactionComplete( 123 void WriteTransaction::NotifyTransactionComplete(
124 ModelTypeSet models_with_changes) { 124 ModelTypeSet models_with_changes) {
125 directory_->kernel()->delegate->HandleTransactionCompleteChangeEvent( 125 directory_->kernel()->delegate->HandleTransactionCompleteChangeEvent(
126 models_with_changes); 126 models_with_changes);
127 } 127 }
128 128
129 void WriteTransaction::UpdateTransactionVersion( 129 void WriteTransaction::UpdateTransactionVersion(
130 const std::vector<int64_t>& entry_changed) { 130 const std::vector<int64_t>& entry_changed) {
131 syncer::ModelTypeSet type_seen; 131 ModelTypeSet type_seen;
132 for (uint32_t i = 0; i < entry_changed.size(); ++i) { 132 for (uint32_t i = 0; i < entry_changed.size(); ++i) {
133 MutableEntry entry(this, GET_BY_HANDLE, entry_changed[i]); 133 MutableEntry entry(this, GET_BY_HANDLE, entry_changed[i]);
134 if (entry.good()) { 134 if (entry.good()) {
135 ModelType type = GetModelTypeFromSpecifics(entry.GetSpecifics()); 135 ModelType type = GetModelTypeFromSpecifics(entry.GetSpecifics());
136 if (type < FIRST_REAL_MODEL_TYPE) 136 if (type < FIRST_REAL_MODEL_TYPE)
137 continue; 137 continue;
138 if (!type_seen.Has(type)) { 138 if (!type_seen.Has(type)) {
139 directory_->IncrementTransactionVersion(type); 139 directory_->IncrementTransactionVersion(type);
140 type_seen.Put(type); 140 type_seen.Put(type);
141 } 141 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 ENUM_CASE(SYNCAPI); 187 ENUM_CASE(SYNCAPI);
188 } 188 }
189 NOTREACHED(); 189 NOTREACHED();
190 return std::string(); 190 return std::string();
191 } 191 }
192 192
193 #undef ENUM_CASE 193 #undef ENUM_CASE
194 194
195 } // namespace syncable 195 } // namespace syncable
196 } // namespace syncer 196 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698