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

Side by Side Diff: components/sync/driver/model_associator.h

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DRIVER_MODEL_ASSOCIATOR_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATOR_H_
6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATOR_H_ 6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // chrome id. 73 // chrome id.
74 virtual int64_t GetSyncIdFromChromeId(const IDType& id) = 0; 74 virtual int64_t GetSyncIdFromChromeId(const IDType& id) = 0;
75 75
76 // Returns the chrome node for the given sync id. 76 // Returns the chrome node for the given sync id.
77 // Returns NULL if no node is found for the given sync id. 77 // Returns NULL if no node is found for the given sync id.
78 virtual const Node* GetChromeNodeFromSyncId(int64_t sync_id) = 0; 78 virtual const Node* GetChromeNodeFromSyncId(int64_t sync_id) = 0;
79 79
80 // Initializes the given sync node from the given chrome node id. 80 // Initializes the given sync node from the given chrome node id.
81 // Returns false if no sync node was found for the given chrome node id or 81 // Returns false if no sync node was found for the given chrome node id or
82 // if the initialization of sync node fails. 82 // if the initialization of sync node fails.
83 virtual bool InitSyncNodeFromChromeId( 83 virtual bool InitSyncNodeFromChromeId(const IDType& node_id,
84 const IDType& node_id, 84 syncer::BaseNode* sync_node) = 0;
85 syncer::BaseNode* sync_node) = 0;
86 85
87 // Associates the given chrome node with the given sync node. 86 // Associates the given chrome node with the given sync node.
88 virtual void Associate(const Node* node, 87 virtual void Associate(const Node* node,
89 const syncer::BaseNode& sync_node) = 0; 88 const syncer::BaseNode& sync_node) = 0;
90 89
91 // Remove the association that corresponds to the given sync id. 90 // Remove the association that corresponds to the given sync id.
92 virtual void Disassociate(int64_t sync_id) = 0; 91 virtual void Disassociate(int64_t sync_id) = 0;
93 }; 92 };
94 93
95 } // namespace sync_driver 94 } // namespace sync_driver
96 95
97 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATOR_H_ 96 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « components/sync/driver/model_association_manager_unittest.cc ('k') | components/sync/driver/model_associator_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698