| 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 #ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "sync/base/sync_export.h" |
| 13 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
| 14 #include "sync/internal_api/public/base_node.h" | 15 #include "sync/internal_api/public/base_node.h" |
| 15 | 16 |
| 16 namespace sync_pb { | 17 namespace sync_pb { |
| 17 class AppSpecifics; | 18 class AppSpecifics; |
| 18 class AutofillSpecifics; | 19 class AutofillSpecifics; |
| 19 class AutofillProfileSpecifics; | 20 class AutofillProfileSpecifics; |
| 20 class BookmarkSpecifics; | 21 class BookmarkSpecifics; |
| 21 class EntitySpecifics; | 22 class EntitySpecifics; |
| 22 class ExtensionSpecifics; | 23 class ExtensionSpecifics; |
| 23 class SessionSpecifics; | 24 class SessionSpecifics; |
| 24 class NigoriSpecifics; | 25 class NigoriSpecifics; |
| 25 class PasswordSpecificsData; | 26 class PasswordSpecificsData; |
| 26 class ThemeSpecifics; | 27 class ThemeSpecifics; |
| 27 class TypedUrlSpecifics; | 28 class TypedUrlSpecifics; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace syncer { | 31 namespace syncer { |
| 31 | 32 |
| 32 class Cryptographer; | 33 class Cryptographer; |
| 33 class WriteTransaction; | 34 class WriteTransaction; |
| 34 | 35 |
| 35 namespace syncable { | 36 namespace syncable { |
| 36 class Entry; | 37 class Entry; |
| 37 class MutableEntry; | 38 class MutableEntry; |
| 38 } | 39 } |
| 39 | 40 |
| 40 // WriteNode extends BaseNode to add mutation, and wraps | 41 // WriteNode extends BaseNode to add mutation, and wraps |
| 41 // syncable::MutableEntry. A WriteTransaction is needed to create a WriteNode. | 42 // syncable::MutableEntry. A WriteTransaction is needed to create a WriteNode. |
| 42 class WriteNode : public BaseNode { | 43 class SYNC_EXPORT WriteNode : public BaseNode { |
| 43 public: | 44 public: |
| 44 enum InitUniqueByCreationResult { | 45 enum InitUniqueByCreationResult { |
| 45 INIT_SUCCESS, | 46 INIT_SUCCESS, |
| 46 // The tag passed into this method was empty. | 47 // The tag passed into this method was empty. |
| 47 INIT_FAILED_EMPTY_TAG, | 48 INIT_FAILED_EMPTY_TAG, |
| 48 // An entry with this tag already exists. | 49 // An entry with this tag already exists. |
| 49 INIT_FAILED_ENTRY_ALREADY_EXISTS, | 50 INIT_FAILED_ENTRY_ALREADY_EXISTS, |
| 50 // The constructor for a new MutableEntry with the specified data failed. | 51 // The constructor for a new MutableEntry with the specified data failed. |
| 51 INIT_FAILED_COULD_NOT_CREATE_ENTRY, | 52 INIT_FAILED_COULD_NOT_CREATE_ENTRY, |
| 52 // Setting the predecessor failed | 53 // Setting the predecessor failed |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 193 |
| 193 // The sync API transaction that is the parent of this node. | 194 // The sync API transaction that is the parent of this node. |
| 194 WriteTransaction* transaction_; | 195 WriteTransaction* transaction_; |
| 195 | 196 |
| 196 DISALLOW_COPY_AND_ASSIGN(WriteNode); | 197 DISALLOW_COPY_AND_ASSIGN(WriteNode); |
| 197 }; | 198 }; |
| 198 | 199 |
| 199 } // namespace syncer | 200 } // namespace syncer |
| 200 | 201 |
| 201 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ | 202 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ |
| OLD | NEW |