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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool create_mobile_bookmarks_folder, | 68 bool create_mobile_bookmarks_folder, |
69 ModelTypeSet request_types, | 69 ModelTypeSet request_types, |
70 sync_pb::ClientToServerMessage* client_to_server_message); | 70 sync_pb::ClientToServerMessage* client_to_server_message); |
71 | 71 |
72 // Helper function. Defined here for testing. | 72 // Helper function. Defined here for testing. |
73 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPollImpl( | 73 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPollImpl( |
74 ModelTypeSet proto_request_types, | 74 ModelTypeSet proto_request_types, |
75 UpdateHandlerMap* update_handler_map, | 75 UpdateHandlerMap* update_handler_map, |
76 sync_pb::GetUpdatesMessage* get_updates); | 76 sync_pb::GetUpdatesMessage* get_updates); |
77 | 77 |
| 78 // Same as BuildDownloadUpdatesForPoll() except the update origin/source is |
| 79 // RETRY. |
| 80 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetry( |
| 81 sessions::SyncSession* session, |
| 82 bool create_mobile_bookmarks_folder, |
| 83 ModelTypeSet request_types, |
| 84 sync_pb::ClientToServerMessage* client_to_server_message); |
| 85 |
| 86 // Same as BuildDownloadUpdatesForPollImpl() except the update origin/source is |
| 87 // RETRY. |
| 88 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetryImpl( |
| 89 ModelTypeSet proto_request_types, |
| 90 UpdateHandlerMap* update_handler_map, |
| 91 sync_pb::GetUpdatesMessage* get_updates); |
| 92 |
78 // Sends the specified message to the server and stores the response in a member | 93 // Sends the specified message to the server and stores the response in a member |
79 // of the |session|'s StatusController. | 94 // of the |session|'s StatusController. |
80 SYNC_EXPORT_PRIVATE SyncerError | 95 SYNC_EXPORT_PRIVATE SyncerError |
81 ExecuteDownloadUpdates(ModelTypeSet request_types, | 96 ExecuteDownloadUpdates(ModelTypeSet request_types, |
82 sessions::SyncSession* session, | 97 sessions::SyncSession* session, |
83 sync_pb::ClientToServerMessage* msg); | 98 sync_pb::ClientToServerMessage* msg); |
84 | 99 |
85 // Helper function for processing responses from the server. | 100 // Helper function for processing responses from the server. |
86 // Defined here for testing. | 101 // Defined here for testing. |
87 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( | 102 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( |
88 const sync_pb::GetUpdatesResponse& gu_response, | 103 const sync_pb::GetUpdatesResponse& gu_response, |
89 ModelTypeSet proto_request_types, | 104 ModelTypeSet proto_request_types, |
90 UpdateHandlerMap* handler_map, | 105 UpdateHandlerMap* handler_map, |
91 sessions::StatusController* status); | 106 sessions::StatusController* status); |
92 | 107 |
93 // Helper function to copy client debug info from debug_info_getter to | 108 // Helper function to copy client debug info from debug_info_getter to |
94 // debug_info. Defined here for testing. | 109 // debug_info. Defined here for testing. |
95 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( | 110 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( |
96 sessions::DebugInfoGetter* debug_info_getter, | 111 sessions::DebugInfoGetter* debug_info_getter, |
97 sync_pb::DebugInfo* debug_info); | 112 sync_pb::DebugInfo* debug_info); |
98 | 113 |
99 } // namespace download | 114 } // namespace download |
100 | 115 |
101 } // namespace syncer | 116 } // namespace syncer |
102 | 117 |
103 #endif // SYNC_ENGINE_DOWNLOAD_H_ | 118 #endif // SYNC_ENGINE_DOWNLOAD_H_ |
OLD | NEW |