| OLD | NEW |
| 1 // Copyright 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 "components/sync/syncable/syncable_write_transaction.h" | 5 #include "components/sync/syncable/syncable_write_transaction.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "components/sync/syncable/directory.h" | 9 #include "components/sync/syncable/directory.h" |
| 10 #include "components/sync/syncable/directory_change_delegate.h" | 10 #include "components/sync/syncable/directory_change_delegate.h" |
| 11 #include "components/sync/syncable/mutable_entry.h" | 11 #include "components/sync/syncable/mutable_entry.h" |
| 12 #include "components/sync/syncable/transaction_observer.h" | 12 #include "components/sync/syncable/transaction_observer.h" |
| 13 #include "components/sync/syncable/write_transaction_info.h" | 13 #include "components/sync/syncable/write_transaction_info.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 namespace syncable { | 16 namespace syncable { |
| 17 | 17 |
| 18 const int64_t kInvalidTransactionVersion = -1; | 18 const int64_t kInvalidTransactionVersion = -1; |
| 19 | 19 |
| 20 WriteTransaction::WriteTransaction(const tracked_objects::Location& location, | 20 WriteTransaction::WriteTransaction(const tracked_objects::Location& location, |
| 21 WriterTag writer, | 21 WriterTag writer, |
| 22 Directory* directory) | 22 Directory* directory) |
| 23 : BaseWriteTransaction(location, "WriteTransaction", writer, directory), | 23 : BaseWriteTransaction(location, "WriteTransaction", writer, directory), |
| 24 transaction_version_(NULL) { | 24 transaction_version_(nullptr) { |
| 25 Lock(); | 25 Lock(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 WriteTransaction::WriteTransaction(const tracked_objects::Location& location, | 28 WriteTransaction::WriteTransaction(const tracked_objects::Location& location, |
| 29 Directory* directory, | 29 Directory* directory, |
| 30 int64_t* transaction_version) | 30 int64_t* transaction_version) |
| 31 : BaseWriteTransaction(location, "WriteTransaction", SYNCAPI, directory), | 31 : BaseWriteTransaction(location, "WriteTransaction", SYNCAPI, directory), |
| 32 transaction_version_(transaction_version) { | 32 transaction_version_(transaction_version) { |
| 33 Lock(); | 33 Lock(); |
| 34 if (transaction_version_) | 34 if (transaction_version_) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ENUM_CASE(SYNCAPI); | 185 ENUM_CASE(SYNCAPI); |
| 186 } | 186 } |
| 187 NOTREACHED(); | 187 NOTREACHED(); |
| 188 return std::string(); | 188 return std::string(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 #undef ENUM_CASE | 191 #undef ENUM_CASE |
| 192 | 192 |
| 193 } // namespace syncable | 193 } // namespace syncable |
| 194 } // namespace syncer | 194 } // namespace syncer |
| OLD | NEW |