| OLD | NEW |
| 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/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/syncable/directory.h" | 8 #include "sync/syncable/directory.h" |
| 9 #include "sync/syncable/scoped_index_updater.h" | 9 #include "sync/syncable/scoped_index_updater.h" |
| 10 #include "sync/syncable/scoped_kernel_lock.h" | 10 #include "sync/syncable/scoped_kernel_lock.h" |
| 11 #include "sync/syncable/syncable-inl.h" | 11 #include "sync/syncable/syncable-inl.h" |
| 12 #include "sync/syncable/syncable_changes_version.h" | 12 #include "sync/syncable/syncable_changes_version.h" |
| 13 #include "sync/syncable/syncable_util.h" | 13 #include "sync/syncable/syncable_util.h" |
| 14 #include "sync/syncable/write_transaction.h" | 14 #include "sync/syncable/write_transaction.h" |
| 15 | 15 |
| 16 using std::string; | 16 using std::string; |
| 17 | 17 |
| 18 namespace syncer { |
| 18 namespace syncable { | 19 namespace syncable { |
| 19 | 20 |
| 20 MutableEntry::MutableEntry(WriteTransaction* trans, Create, | 21 MutableEntry::MutableEntry(WriteTransaction* trans, Create, |
| 21 const Id& parent_id, const string& name) | 22 const Id& parent_id, const string& name) |
| 22 : Entry(trans), | 23 : Entry(trans), |
| 23 write_transaction_(trans) { | 24 write_transaction_(trans) { |
| 24 Init(trans, parent_id, name); | 25 Init(trans, parent_id, name); |
| 25 } | 26 } |
| 26 | 27 |
| 27 | 28 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 Put(NEXT_ID, successor_id); | 401 Put(NEXT_ID, successor_id); |
| 401 return true; | 402 return true; |
| 402 } | 403 } |
| 403 | 404 |
| 404 bool MutableEntry::Put(BitTemp field, bool value) { | 405 bool MutableEntry::Put(BitTemp field, bool value) { |
| 405 DCHECK(kernel_); | 406 DCHECK(kernel_); |
| 406 kernel_->put(field, value); | 407 kernel_->put(field, value); |
| 407 return true; | 408 return true; |
| 408 } | 409 } |
| 409 | 410 |
| 410 } | 411 } // namespace syncable |
| 412 } // namespace syncer |
| OLD | NEW |