OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const sync_pb::ClientToServerResponse* response, | 108 const sync_pb::ClientToServerResponse* response, |
109 sessions::SyncSession* session); | 109 sessions::SyncSession* session); |
110 | 110 |
111 // Post the message using the scm, and do some processing on the returned | 111 // Post the message using the scm, and do some processing on the returned |
112 // headers. Decode the server response. | 112 // headers. Decode the server response. |
113 static bool PostAndProcessHeaders(browser_sync::ServerConnectionManager* scm, | 113 static bool PostAndProcessHeaders(browser_sync::ServerConnectionManager* scm, |
114 sessions::SyncSession* session, | 114 sessions::SyncSession* session, |
115 const ClientToServerMessage& msg, | 115 const ClientToServerMessage& msg, |
116 sync_pb::ClientToServerResponse* response); | 116 sync_pb::ClientToServerResponse* response); |
117 | 117 |
| 118 static base::TimeDelta GetThrottleDelay( |
| 119 const sync_pb::ClientToServerResponse& response); |
| 120 |
118 friend class SyncerProtoUtilTest; | 121 friend class SyncerProtoUtilTest; |
119 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday); | 122 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday); |
120 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders); | 123 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders); |
121 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); | 124 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); |
122 | 125 |
123 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); | 126 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); |
124 }; | 127 }; |
125 | 128 |
126 } // namespace browser_sync | 129 } // namespace browser_sync |
127 | 130 |
128 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 131 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
OLD | NEW |