| 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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 virtual void OnEncryptionComplete( | 859 virtual void OnEncryptionComplete( |
| 860 const syncable::ModelTypeSet& encrypted_types) = 0; | 860 const syncable::ModelTypeSet& encrypted_types) = 0; |
| 861 | 861 |
| 862 protected: | 862 protected: |
| 863 virtual ~Observer(); | 863 virtual ~Observer(); |
| 864 }; | 864 }; |
| 865 | 865 |
| 866 typedef Callback0::Type ModeChangeCallback; | 866 typedef Callback0::Type ModeChangeCallback; |
| 867 | 867 |
| 868 // Create an uninitialized SyncManager. Callers must Init() before using. | 868 // Create an uninitialized SyncManager. Callers must Init() before using. |
| 869 SyncManager(); | 869 explicit SyncManager(const std::string& name); |
| 870 virtual ~SyncManager(); | 870 virtual ~SyncManager(); |
| 871 | 871 |
| 872 // Initialize the sync manager. |database_location| specifies the path of | 872 // Initialize the sync manager. |database_location| specifies the path of |
| 873 // the directory in which to locate a sqlite repository storing the syncer | 873 // the directory in which to locate a sqlite repository storing the syncer |
| 874 // backend state. Initialization will open the database, or create it if it | 874 // backend state. Initialization will open the database, or create it if it |
| 875 // does not already exist. Returns false on failure. | 875 // does not already exist. Returns false on failure. |
| 876 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync | 876 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync |
| 877 // server to use, and |use_ssl| specifies whether to communicate securely; | 877 // server to use, and |use_ssl| specifies whether to communicate securely; |
| 878 // the default is false. | 878 // the default is false. |
| 879 // |post_factory| will be owned internally and used to create | 879 // |post_factory| will be owned internally and used to create |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 private: | 1086 private: |
| 1087 // An opaque pointer to the nested private class. | 1087 // An opaque pointer to the nested private class. |
| 1088 SyncInternal* data_; | 1088 SyncInternal* data_; |
| 1089 | 1089 |
| 1090 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 1090 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
| 1091 }; | 1091 }; |
| 1092 | 1092 |
| 1093 } // namespace sync_api | 1093 } // namespace sync_api |
| 1094 | 1094 |
| 1095 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1095 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
| OLD | NEW |