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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 // backend state. Initialization will open the database, or create it if it | 839 // backend state. Initialization will open the database, or create it if it |
840 // does not already exist. Returns false on failure. | 840 // does not already exist. Returns false on failure. |
841 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync | 841 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync |
842 // server to use, and |use_ssl| specifies whether to communicate securely; | 842 // server to use, and |use_ssl| specifies whether to communicate securely; |
843 // the default is false. | 843 // the default is false. |
844 // |post_factory| will be owned internally and used to create | 844 // |post_factory| will be owned internally and used to create |
845 // instances of an HttpPostProvider. | 845 // instances of an HttpPostProvider. |
846 // |model_safe_worker| ownership is given to the SyncManager. | 846 // |model_safe_worker| ownership is given to the SyncManager. |
847 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent | 847 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent |
848 // HTTP header. Used internally when collecting stats to classify clients. | 848 // HTTP header. Used internally when collecting stats to classify clients. |
849 // |sync_notifier| will be owned internally and used to listen for | 849 // |sync_notifier| used to listen for notifications, not owned. |
850 // notifications. | |
851 bool Init(const FilePath& database_location, | 850 bool Init(const FilePath& database_location, |
852 const char* sync_server_and_path, | 851 const char* sync_server_and_path, |
853 int sync_server_port, | 852 int sync_server_port, |
854 bool use_ssl, | 853 bool use_ssl, |
855 HttpPostProviderFactory* post_factory, | 854 HttpPostProviderFactory* post_factory, |
856 browser_sync::ModelSafeWorkerRegistrar* registrar, | 855 browser_sync::ModelSafeWorkerRegistrar* registrar, |
857 const char* user_agent, | 856 const char* user_agent, |
858 const SyncCredentials& credentials, | 857 const SyncCredentials& credentials, |
859 sync_notifier::SyncNotifier* sync_notifier, | 858 sync_notifier::SyncNotifier* sync_notifier, |
860 const std::string& restored_key_for_bootstrapping, | 859 const std::string& restored_key_for_bootstrapping, |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 virtual const std::string GetResponseHeaderValue( | 1078 virtual const std::string GetResponseHeaderValue( |
1080 const std::string& name) const = 0; | 1079 const std::string& name) const = 0; |
1081 | 1080 |
1082 private: | 1081 private: |
1083 DISALLOW_COPY_AND_ASSIGN(HttpPostProviderInterface); | 1082 DISALLOW_COPY_AND_ASSIGN(HttpPostProviderInterface); |
1084 }; | 1083 }; |
1085 | 1084 |
1086 } // namespace sync_api | 1085 } // namespace sync_api |
1087 | 1086 |
1088 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1087 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
OLD | NEW |