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 above except the update origin is RETRY. | |
79 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetry( | |
80 sessions::SyncSession* session, | |
81 bool create_mobile_bookmarks_folder, | |
82 ModelTypeSet request_types, | |
83 sync_pb::ClientToServerMessage* client_to_server_message); | |
84 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetryImpl( | |
rlarocque
2014/01/08 20:30:08
The reason we have separate Impl methods is to all
haitaol1
2014/01/10 00:15:58
Done.
| |
85 ModelTypeSet proto_request_types, | |
86 UpdateHandlerMap* update_handler_map, | |
87 sync_pb::GetUpdatesMessage* get_updates); | |
88 | |
78 // Sends the specified message to the server and stores the response in a member | 89 // Sends the specified message to the server and stores the response in a member |
79 // of the |session|'s StatusController. | 90 // of the |session|'s StatusController. |
80 SYNC_EXPORT_PRIVATE SyncerError | 91 SYNC_EXPORT_PRIVATE SyncerError |
81 ExecuteDownloadUpdates(ModelTypeSet request_types, | 92 ExecuteDownloadUpdates(ModelTypeSet request_types, |
82 sessions::SyncSession* session, | 93 sessions::SyncSession* session, |
83 sync_pb::ClientToServerMessage* msg); | 94 sync_pb::ClientToServerMessage* msg); |
84 | 95 |
85 // Helper function for processing responses from the server. | 96 // Helper function for processing responses from the server. |
86 // Defined here for testing. | 97 // Defined here for testing. |
87 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( | 98 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( |
88 const sync_pb::GetUpdatesResponse& gu_response, | 99 const sync_pb::GetUpdatesResponse& gu_response, |
89 ModelTypeSet proto_request_types, | 100 ModelTypeSet proto_request_types, |
90 UpdateHandlerMap* handler_map, | 101 UpdateHandlerMap* handler_map, |
91 sessions::StatusController* status); | 102 sessions::StatusController* status); |
92 | 103 |
93 // Helper function to copy client debug info from debug_info_getter to | 104 // Helper function to copy client debug info from debug_info_getter to |
94 // debug_info. Defined here for testing. | 105 // debug_info. Defined here for testing. |
95 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( | 106 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( |
96 sessions::DebugInfoGetter* debug_info_getter, | 107 sessions::DebugInfoGetter* debug_info_getter, |
97 sync_pb::DebugInfo* debug_info); | 108 sync_pb::DebugInfo* debug_info); |
98 | 109 |
99 } // namespace download | 110 } // namespace download |
100 | 111 |
101 } // namespace syncer | 112 } // namespace syncer |
102 | 113 |
103 #endif // SYNC_ENGINE_DOWNLOAD_H_ | 114 #endif // SYNC_ENGINE_DOWNLOAD_H_ |
OLD | NEW |