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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "sync/syncable/scoped_parent_child_index_updater.h" 5 #include "components/sync/syncable/scoped_parent_child_index_updater.h"
6 6
7 #include "sync/syncable/parent_child_index.h" 7 #include "components/sync/syncable/parent_child_index.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 namespace syncable { 10 namespace syncable {
11 11
12 ScopedParentChildIndexUpdater::ScopedParentChildIndexUpdater( 12 ScopedParentChildIndexUpdater::ScopedParentChildIndexUpdater(
13 const ScopedKernelLock& proof_of_lock, 13 const ScopedKernelLock& proof_of_lock,
14 EntryKernel* entry, 14 EntryKernel* entry,
15 ParentChildIndex* index) 15 ParentChildIndex* index)
16 : entry_(entry), index_(index) { 16 : entry_(entry), index_(index) {
17 if (ParentChildIndex::ShouldInclude(entry_)) { 17 if (ParentChildIndex::ShouldInclude(entry_)) {
18 index_->Remove(entry_); 18 index_->Remove(entry_);
19 } 19 }
20 } 20 }
21 21
22 ScopedParentChildIndexUpdater::~ScopedParentChildIndexUpdater() { 22 ScopedParentChildIndexUpdater::~ScopedParentChildIndexUpdater() {
23 if (ParentChildIndex::ShouldInclude(entry_)) { 23 if (ParentChildIndex::ShouldInclude(entry_)) {
24 index_->Insert(entry_); 24 index_->Insert(entry_);
25 } 25 }
26 } 26 }
27 27
28 } // namespace syncable 28 } // namespace syncable
29 } // namespace syncer 29 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/syncable/scoped_parent_child_index_updater.h ('k') | components/sync/syncable/syncable-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698