| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file defines the "sync API", an interface to the syncer | 5 // This file defines the "sync API", an interface to the syncer |
| 6 // backend that exposes (1) the core functionality of maintaining a consistent | 6 // backend that exposes (1) the core functionality of maintaining a consistent |
| 7 // local snapshot of a hierarchical object set; (2) a means to transactionally | 7 // local snapshot of a hierarchical object set; (2) a means to transactionally |
| 8 // access and modify those objects; (3) a means to control client/server | 8 // access and modify those objects; (3) a means to control client/server |
| 9 // synchronization tasks, namely: pushing local object modifications to a | 9 // synchronization tasks, namely: pushing local object modifications to a |
| 10 // server, pulling nonlocal object modifications from a server to this client, | 10 // server, pulling nonlocal object modifications from a server to this client, |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 private: | 538 private: |
| 539 // A syncable ScopedDirLookup, which is the parent of syncable transactions. | 539 // A syncable ScopedDirLookup, which is the parent of syncable transactions. |
| 540 syncable::ScopedDirLookup* lookup_; | 540 syncable::ScopedDirLookup* lookup_; |
| 541 | 541 |
| 542 browser_sync::Cryptographer* cryptographer_; | 542 browser_sync::Cryptographer* cryptographer_; |
| 543 | 543 |
| 544 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); | 544 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 // TODO(akalin): Make ReadTransaction/WriteTransaction take a Location |
| 548 // parameter. |
| 549 |
| 547 // Sync API's ReadTransaction is a read-only BaseTransaction. It wraps | 550 // Sync API's ReadTransaction is a read-only BaseTransaction. It wraps |
| 548 // a syncable::ReadTransaction. | 551 // a syncable::ReadTransaction. |
| 549 class ReadTransaction : public BaseTransaction { | 552 class ReadTransaction : public BaseTransaction { |
| 550 public: | 553 public: |
| 551 // Start a new read-only transaction on the specified repository. | 554 // Start a new read-only transaction on the specified repository. |
| 552 explicit ReadTransaction(UserShare* share); | 555 explicit ReadTransaction(UserShare* share); |
| 553 | 556 |
| 554 // Resume the middle of a transaction. Will not close transaction. | 557 // Resume the middle of a transaction. Will not close transaction. |
| 555 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans); | 558 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans); |
| 556 | 559 |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 private: | 1064 private: |
| 1062 // An opaque pointer to the nested private class. | 1065 // An opaque pointer to the nested private class. |
| 1063 SyncInternal* data_; | 1066 SyncInternal* data_; |
| 1064 | 1067 |
| 1065 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 1068 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
| 1066 }; | 1069 }; |
| 1067 | 1070 |
| 1068 } // namespace sync_api | 1071 } // namespace sync_api |
| 1069 | 1072 |
| 1070 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1073 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
| OLD | NEW |