| 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/internal_api/public/read_node.h" | 5 #include "sync/internal_api/public/read_node.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "sync/internal_api/public/base_transaction.h" | 8 #include "sync/internal_api/public/base_transaction.h" |
| 9 #include "sync/syncable/base_transaction.h" | 9 #include "sync/syncable/base_transaction.h" |
| 10 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
| 11 | 11 |
| 12 namespace csync { | 12 namespace syncer { |
| 13 | 13 |
| 14 ////////////////////////////////////////////////////////////////////////// | 14 ////////////////////////////////////////////////////////////////////////// |
| 15 // ReadNode member definitions | 15 // ReadNode member definitions |
| 16 ReadNode::ReadNode(const BaseTransaction* transaction) | 16 ReadNode::ReadNode(const BaseTransaction* transaction) |
| 17 : entry_(NULL), transaction_(transaction) { | 17 : entry_(NULL), transaction_(transaction) { |
| 18 DCHECK(transaction); | 18 DCHECK(transaction); |
| 19 } | 19 } |
| 20 | 20 |
| 21 ReadNode::ReadNode() { | 21 ReadNode::ReadNode() { |
| 22 entry_ = NULL; | 22 entry_ = NULL; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return INIT_FAILED_ENTRY_NOT_GOOD; | 88 return INIT_FAILED_ENTRY_NOT_GOOD; |
| 89 if (entry_->Get(syncable::IS_DEL)) | 89 if (entry_->Get(syncable::IS_DEL)) |
| 90 return INIT_FAILED_ENTRY_IS_DEL; | 90 return INIT_FAILED_ENTRY_IS_DEL; |
| 91 syncable::ModelType model_type = GetModelType(); | 91 syncable::ModelType model_type = GetModelType(); |
| 92 LOG_IF(WARNING, model_type == syncable::UNSPECIFIED || | 92 LOG_IF(WARNING, model_type == syncable::UNSPECIFIED || |
| 93 model_type == syncable::TOP_LEVEL_FOLDER) | 93 model_type == syncable::TOP_LEVEL_FOLDER) |
| 94 << "SyncAPI InitByTagLookup referencing unusually typed object."; | 94 << "SyncAPI InitByTagLookup referencing unusually typed object."; |
| 95 return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY; | 95 return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY; |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace csync | 98 } // namespace syncer |
| OLD | NEW |