OLD | NEW |
1 // Copyright (c) 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 "sync/syncable/mutable_entry.h" | 5 #include "sync/syncable/mutable_entry.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "sync/internal_api/public/base/node_ordinal.h" | 8 #include "sync/internal_api/public/base/node_ordinal.h" |
9 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
10 #include "sync/syncable/scoped_index_updater.h" | 10 #include "sync/syncable/scoped_index_updater.h" |
11 #include "sync/syncable/scoped_kernel_lock.h" | 11 #include "sync/syncable/scoped_kernel_lock.h" |
12 #include "sync/syncable/syncable-inl.h" | 12 #include "sync/syncable/syncable-inl.h" |
13 #include "sync/syncable/syncable_changes_version.h" | 13 #include "sync/syncable/syncable_changes_version.h" |
14 #include "sync/syncable/syncable_util.h" | 14 #include "sync/syncable/syncable_util.h" |
15 #include "sync/syncable/write_transaction.h" | 15 #include "sync/syncable/syncable_write_transaction.h" |
16 | 16 |
17 using std::string; | 17 using std::string; |
18 | 18 |
19 namespace syncer { | 19 namespace syncer { |
20 namespace syncable { | 20 namespace syncable { |
21 | 21 |
22 MutableEntry::MutableEntry(WriteTransaction* trans, Create, | 22 MutableEntry::MutableEntry(WriteTransaction* trans, Create, |
23 const Id& parent_id, const string& name) | 23 const Id& parent_id, const string& name) |
24 : Entry(trans), | 24 : Entry(trans), |
25 write_transaction_(trans) { | 25 write_transaction_(trans) { |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 DCHECK_NE(static_cast<MutableEntry*>(NULL), e); | 426 DCHECK_NE(static_cast<MutableEntry*>(NULL), e); |
427 DCHECK(!e->IsRoot()) << "We shouldn't mark a permanent object for syncing."; | 427 DCHECK(!e->IsRoot()) << "We shouldn't mark a permanent object for syncing."; |
428 if (!(e->Put(IS_UNSYNCED, true))) | 428 if (!(e->Put(IS_UNSYNCED, true))) |
429 return false; | 429 return false; |
430 e->Put(SYNCING, false); | 430 e->Put(SYNCING, false); |
431 return true; | 431 return true; |
432 } | 432 } |
433 | 433 |
434 } // namespace syncable | 434 } // namespace syncable |
435 } // namespace syncer | 435 } // namespace syncer |
OLD | NEW |