| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 SYNC_ENGINE_DOWNLOAD_H_ | 5 #ifndef SYNC_ENGINE_DOWNLOAD_H_ |
| 6 #define SYNC_ENGINE_DOWNLOAD_H_ | 6 #define SYNC_ENGINE_DOWNLOAD_H_ |
| 7 | 7 |
| 8 #include "sync/base/sync_export.h" | 8 #include "sync/base/sync_export.h" |
| 9 #include "sync/engine/sync_directory_update_handler.h" | 9 #include "sync/engine/sync_directory_update_handler.h" |
| 10 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Helper function. Defined here for testing. | 56 // Helper function. Defined here for testing. |
| 57 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForConfigureImpl( | 57 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForConfigureImpl( |
| 58 ModelTypeSet proto_request_types, | 58 ModelTypeSet proto_request_types, |
| 59 UpdateHandlerMap* update_handler_map, | 59 UpdateHandlerMap* update_handler_map, |
| 60 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, | 60 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, |
| 61 sync_pb::GetUpdatesMessage* get_updates); | 61 sync_pb::GetUpdatesMessage* get_updates); |
| 62 | 62 |
| 63 // This function executes a single GetUpdate request and stores the response in | 63 // This function executes a single GetUpdate request and stores the response in |
| 64 // the session's status controller. It constructs the type of request used for | 64 // the session's status controller. It constructs the type of request used for |
| 65 // periodic polling. | 65 // periodic polling or retry. |
| 66 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPoll( | 66 SYNC_EXPORT_PRIVATE void BuildSupplementDownloadUpdates( |
| 67 sessions::SyncSession* session, | 67 sessions::SyncSession* session, |
| 68 bool create_mobile_bookmarks_folder, | 68 bool create_mobile_bookmarks_folder, |
| 69 ModelTypeSet request_types, | 69 ModelTypeSet request_types, |
| 70 sync_pb::SyncEnums::GetUpdatesOrigin gu_origin, |
| 70 sync_pb::ClientToServerMessage* client_to_server_message); | 71 sync_pb::ClientToServerMessage* client_to_server_message); |
| 71 | 72 |
| 72 // Helper function. Defined here for testing. | 73 // Helper function. Defined here for testing. |
| 73 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPollImpl( | 74 SYNC_EXPORT_PRIVATE void BuildSupplementDownloadUpdatesImpl( |
| 74 ModelTypeSet proto_request_types, | 75 ModelTypeSet proto_request_types, |
| 76 sync_pb::SyncEnums::GetUpdatesOrigin gu_origin, |
| 75 UpdateHandlerMap* update_handler_map, | 77 UpdateHandlerMap* update_handler_map, |
| 76 sync_pb::GetUpdatesMessage* get_updates); | 78 sync_pb::GetUpdatesMessage* get_updates); |
| 77 | 79 |
| 78 // Sends the specified message to the server and stores the response in a member | 80 // Sends the specified message to the server and stores the response in a member |
| 79 // of the |session|'s StatusController. | 81 // of the |session|'s StatusController. |
| 80 SYNC_EXPORT_PRIVATE SyncerError | 82 SYNC_EXPORT_PRIVATE SyncerError |
| 81 ExecuteDownloadUpdates(ModelTypeSet request_types, | 83 ExecuteDownloadUpdates(ModelTypeSet request_types, |
| 82 sessions::SyncSession* session, | 84 sessions::SyncSession* session, |
| 83 sync_pb::ClientToServerMessage* msg); | 85 sync_pb::ClientToServerMessage* msg); |
| 84 | 86 |
| 85 // Helper function for processing responses from the server. | 87 // Helper function for processing responses from the server. |
| 86 // Defined here for testing. | 88 // Defined here for testing. |
| 87 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( | 89 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( |
| 88 const sync_pb::GetUpdatesResponse& gu_response, | 90 const sync_pb::GetUpdatesResponse& gu_response, |
| 89 ModelTypeSet proto_request_types, | 91 ModelTypeSet proto_request_types, |
| 90 UpdateHandlerMap* handler_map, | 92 UpdateHandlerMap* handler_map, |
| 91 sessions::StatusController* status); | 93 sessions::StatusController* status); |
| 92 | 94 |
| 93 // Helper function to copy client debug info from debug_info_getter to | 95 // Helper function to copy client debug info from debug_info_getter to |
| 94 // debug_info. Defined here for testing. | 96 // debug_info. Defined here for testing. |
| 95 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( | 97 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( |
| 96 sessions::DebugInfoGetter* debug_info_getter, | 98 sessions::DebugInfoGetter* debug_info_getter, |
| 97 sync_pb::DebugInfo* debug_info); | 99 sync_pb::DebugInfo* debug_info); |
| 98 | 100 |
| 99 } // namespace download | 101 } // namespace download |
| 100 | 102 |
| 101 } // namespace syncer | 103 } // namespace syncer |
| 102 | 104 |
| 103 #endif // SYNC_ENGINE_DOWNLOAD_H_ | 105 #endif // SYNC_ENGINE_DOWNLOAD_H_ |
| OLD | NEW |