| 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 #ifndef COMPONENTS_SYNC_CORE_READ_NODE_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_READ_NODE_H_ |
| 6 #define COMPONENTS_SYNC_CORE_READ_NODE_H_ | 6 #define COMPONENTS_SYNC_CORE_READ_NODE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "components/sync/base/model_type.h" | 15 #include "components/sync/base/model_type.h" |
| 16 #include "components/sync/base/sync_export.h" | |
| 17 #include "components/sync/core/base_node.h" | 16 #include "components/sync/core/base_node.h" |
| 18 | 17 |
| 19 namespace syncer { | 18 namespace syncer { |
| 20 | 19 |
| 21 // ReadNode wraps a syncable::Entry to provide the functionality of a | 20 // ReadNode wraps a syncable::Entry to provide the functionality of a |
| 22 // read-only BaseNode. | 21 // read-only BaseNode. |
| 23 class SYNC_EXPORT ReadNode : public BaseNode { | 22 class ReadNode : public BaseNode { |
| 24 public: | 23 public: |
| 25 // Create an unpopulated ReadNode on the given transaction. Call some flavor | 24 // Create an unpopulated ReadNode on the given transaction. Call some flavor |
| 26 // of Init to populate the ReadNode with a database entry. | 25 // of Init to populate the ReadNode with a database entry. |
| 27 explicit ReadNode(const BaseTransaction* transaction); | 26 explicit ReadNode(const BaseTransaction* transaction); |
| 28 ~ReadNode() override; | 27 ~ReadNode() override; |
| 29 | 28 |
| 30 // A client must use one (and only one) of the following Init variants to | 29 // A client must use one (and only one) of the following Init variants to |
| 31 // populate the node. | 30 // populate the node. |
| 32 | 31 |
| 33 // BaseNode implementation. | 32 // BaseNode implementation. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 69 |
| 71 // The sync API transaction that is the parent of this node. | 70 // The sync API transaction that is the parent of this node. |
| 72 const BaseTransaction* transaction_; | 71 const BaseTransaction* transaction_; |
| 73 | 72 |
| 74 DISALLOW_COPY_AND_ASSIGN(ReadNode); | 73 DISALLOW_COPY_AND_ASSIGN(ReadNode); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace syncer | 76 } // namespace syncer |
| 78 | 77 |
| 79 #endif // COMPONENTS_SYNC_CORE_READ_NODE_H_ | 78 #endif // COMPONENTS_SYNC_CORE_READ_NODE_H_ |
| OLD | NEW |