Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: components/sync/core/base_node.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BASE_NODE_H_ 5 #ifndef COMPONENTS_SYNC_CORE_BASE_NODE_H_
6 #define COMPONENTS_SYNC_CORE_BASE_NODE_H_ 6 #define COMPONENTS_SYNC_CORE_BASE_NODE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "components/sync/api/attachments/attachment.h" 18 #include "components/sync/api/attachments/attachment.h"
19 #include "components/sync/base/model_type.h" 19 #include "components/sync/base/model_type.h"
20 #include "components/sync/base/sync_export.h"
21 #include "components/sync/protocol/sync.pb.h" 20 #include "components/sync/protocol/sync.pb.h"
22 #include "url/gurl.h" 21 #include "url/gurl.h"
23 22
24 // Forward declarations of internal class types so that sync API objects 23 // Forward declarations of internal class types so that sync API objects
25 // may have opaque pointers to these types. 24 // may have opaque pointers to these types.
26 namespace base { 25 namespace base {
27 class DictionaryValue; 26 class DictionaryValue;
28 } 27 }
29 28
30 namespace sync_pb { 29 namespace sync_pb {
(...skipping 22 matching lines...) Expand all
53 } 52 }
54 53
55 // A valid BaseNode will never have an ID of zero. 54 // A valid BaseNode will never have an ID of zero.
56 static const int64_t kInvalidId = 0; 55 static const int64_t kInvalidId = 0;
57 56
58 // BaseNode wraps syncable::Entry, and corresponds to a single object's state. 57 // BaseNode wraps syncable::Entry, and corresponds to a single object's state.
59 // This, like syncable::Entry, is intended for use on the stack. A valid 58 // This, like syncable::Entry, is intended for use on the stack. A valid
60 // transaction is necessary to create a BaseNode or any of its children. 59 // transaction is necessary to create a BaseNode or any of its children.
61 // Unlike syncable::Entry, a sync API BaseNode is identified primarily by its 60 // Unlike syncable::Entry, a sync API BaseNode is identified primarily by its
62 // int64_t metahandle, which we call an ID here. 61 // int64_t metahandle, which we call an ID here.
63 class SYNC_EXPORT BaseNode { 62 class BaseNode {
64 public: 63 public:
65 // Enumerates the possible outcomes of trying to initialize a sync node. 64 // Enumerates the possible outcomes of trying to initialize a sync node.
66 enum InitByLookupResult { 65 enum InitByLookupResult {
67 INIT_OK, 66 INIT_OK,
68 // Could not find an entry matching the lookup criteria. 67 // Could not find an entry matching the lookup criteria.
69 INIT_FAILED_ENTRY_NOT_GOOD, 68 INIT_FAILED_ENTRY_NOT_GOOD,
70 // Found an entry, but it is already deleted. 69 // Found an entry, but it is already deleted.
71 INIT_FAILED_ENTRY_IS_DEL, 70 INIT_FAILED_ENTRY_IS_DEL,
72 // Found an entry, but was unable to decrypt. 71 // Found an entry, but was unable to decrypt.
73 INIT_FAILED_DECRYPT_IF_NECESSARY, 72 INIT_FAILED_DECRYPT_IF_NECESSARY,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 234
236 // Same as |unencrypted_data_|, but for legacy password encryption. 235 // Same as |unencrypted_data_|, but for legacy password encryption.
237 std::unique_ptr<sync_pb::PasswordSpecificsData> password_data_; 236 std::unique_ptr<sync_pb::PasswordSpecificsData> password_data_;
238 237
239 DISALLOW_COPY_AND_ASSIGN(BaseNode); 238 DISALLOW_COPY_AND_ASSIGN(BaseNode);
240 }; 239 };
241 240
242 } // namespace syncer 241 } // namespace syncer
243 242
244 #endif // COMPONENTS_SYNC_CORE_BASE_NODE_H_ 243 #endif // COMPONENTS_SYNC_CORE_BASE_NODE_H_
OLDNEW
« no previous file with comments | « components/sync/core/attachments/on_disk_attachment_store.h ('k') | components/sync/core/base_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698