| 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 // will occur, but calls to RequestConfig will be supported. If |callback| | 925 // will occur, but calls to RequestConfig will be supported. If |callback| |
| 926 // is provided, it will be invoked (from the internal SyncScheduler) when | 926 // is provided, it will be invoked (from the internal SyncScheduler) when |
| 927 // the thread has changed to configuration mode. | 927 // the thread has changed to configuration mode. |
| 928 void StartConfigurationMode(ModeChangeCallback* callback); | 928 void StartConfigurationMode(ModeChangeCallback* callback); |
| 929 | 929 |
| 930 // Switches the mode of operation to CONFIGURATION_MODE and | 930 // Switches the mode of operation to CONFIGURATION_MODE and |
| 931 // schedules a config task to fetch updates for |types|. | 931 // schedules a config task to fetch updates for |types|. |
| 932 void RequestConfig(const syncable::ModelTypeBitSet& types, | 932 void RequestConfig(const syncable::ModelTypeBitSet& types, |
| 933 sync_api::ConfigureReason reason); | 933 sync_api::ConfigureReason reason); |
| 934 | 934 |
| 935 // Request a nudge of the syncer, which will cause the syncer thread | 935 void RequestCleanupDisabledTypes(); |
| 936 // to run at the next available opportunity. | |
| 937 void RequestNudge(const tracked_objects::Location& nudge_location); | |
| 938 | 936 |
| 939 // Request a clearing of all data on the server | 937 // Request a clearing of all data on the server |
| 940 void RequestClearServerData(); | 938 void RequestClearServerData(); |
| 941 | 939 |
| 942 // Adds a listener to be notified of sync events. | 940 // Adds a listener to be notified of sync events. |
| 943 // NOTE: It is OK (in fact, it's probably a good idea) to call this before | 941 // NOTE: It is OK (in fact, it's probably a good idea) to call this before |
| 944 // having received OnInitializationCompleted. | 942 // having received OnInitializationCompleted. |
| 945 void AddObserver(Observer* observer); | 943 void AddObserver(Observer* observer); |
| 946 | 944 |
| 947 // Remove the given observer. Make sure to call this if the | 945 // Remove the given observer. Make sure to call this if the |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 private: | 1068 private: |
| 1071 // An opaque pointer to the nested private class. | 1069 // An opaque pointer to the nested private class. |
| 1072 SyncInternal* data_; | 1070 SyncInternal* data_; |
| 1073 | 1071 |
| 1074 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 1072 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
| 1075 }; | 1073 }; |
| 1076 | 1074 |
| 1077 } // namespace sync_api | 1075 } // namespace sync_api |
| 1078 | 1076 |
| 1079 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1077 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
| OLD | NEW |