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

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

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « sync/syncable/scoped_parent_child_index_updater.h ('k') | sync/syncable/syncable_columns.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sync/syncable/scoped_parent_child_index_updater.h"
6
7 #include "sync/syncable/parent_child_index.h"
8
9 namespace syncer {
10 namespace syncable {
11
12 ScopedParentChildIndexUpdater::ScopedParentChildIndexUpdater(
13 ScopedKernelLock& proof_of_lock,
14 EntryKernel* entry,
15 ParentChildIndex* index) : entry_(entry), index_(index) {
16 if (ParentChildIndex::ShouldInclude(entry_)) {
17 index_->Remove(entry_);
18 }
19 }
20
21 ScopedParentChildIndexUpdater::~ScopedParentChildIndexUpdater() {
22 if (ParentChildIndex::ShouldInclude(entry_)) {
23 index_->Insert(entry_);
24 }
25 }
26
27 } // namespace syncer
28 } // namespace syncable
OLDNEW
« no previous file with comments | « sync/syncable/scoped_parent_child_index_updater.h ('k') | sync/syncable/syncable_columns.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698