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

Side by Side Diff: components/sync/engine_impl/process_updates_util.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 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/engine_impl/process_updates_util.h" 5 #include "components/sync/engine_impl/process_updates_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/metrics/sparse_histogram.h" 13 #include "base/metrics/sparse_histogram.h"
14 #include "components/sync/base/cryptographer.h" 14 #include "components/sync/base/cryptographer.h"
15 #include "components/sync/base/data_type_histogram.h" 15 #include "components/sync/base/data_type_histogram.h"
16 #include "components/sync/engine/cycle/update_counters.h" 16 #include "components/sync/engine/cycle/update_counters.h"
17 #include "components/sync/engine_impl/syncer_proto_util.h" 17 #include "components/sync/engine_impl/syncer_proto_util.h"
18 #include "components/sync/engine_impl/syncer_types.h" 18 #include "components/sync/engine_impl/syncer_types.h"
19 #include "components/sync/engine_impl/syncer_util.h" 19 #include "components/sync/engine_impl/syncer_util.h"
20 #include "components/sync/syncable/directory.h" 20 #include "components/sync/syncable/directory.h"
21 #include "components/sync/syncable/model_neutral_mutable_entry.h" 21 #include "components/sync/syncable/model_neutral_mutable_entry.h"
22 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" 22 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h"
23 #include "components/sync/syncable/syncable_proto_util.h" 23 #include "components/sync/syncable/syncable_proto_util.h"
24 #include "components/sync/syncable/syncable_util.h" 24 #include "components/sync/syncable/syncable_util.h"
25 25
26 namespace syncer { 26 namespace syncer {
27 27
28 using syncable::GET_BY_ID; 28 using syncer::syncable::GET_BY_ID;
29 29
30 namespace { 30 namespace {
31 31
32 // This function attempts to determine whether or not this update is genuinely 32 // This function attempts to determine whether or not this update is genuinely
33 // new, or if it is a reflection of one of our own commits. 33 // new, or if it is a reflection of one of our own commits.
34 // 34 //
35 // There is a known inaccuracy in its implementation. If this update ends up 35 // There is a known inaccuracy in its implementation. If this update ends up
36 // being applied to a local item with a different ID, we will count the change 36 // being applied to a local item with a different ID, we will count the change
37 // as being a non-reflection update. Fortunately, the server usually updates 37 // as being a non-reflection update. Fortunately, the server usually updates
38 // our IDs correctly in its commit response, so a new ID during GetUpdate should 38 // our IDs correctly in its commit response, so a new ID during GetUpdate should
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 // Mark entry as unapplied update first to ensure journaling the deletion. 327 // Mark entry as unapplied update first to ensure journaling the deletion.
328 entry.PutIsUnappliedUpdate(true); 328 entry.PutIsUnappliedUpdate(true);
329 // Mark entry as deleted by server. 329 // Mark entry as deleted by server.
330 entry.PutServerIsDel(true); 330 entry.PutServerIsDel(true);
331 entry.PutServerVersion(version_watermark); 331 entry.PutServerVersion(version_watermark);
332 } 332 }
333 } 333 }
334 334
335 } // namespace syncer 335 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698