Chromium Code Reviews| 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 int GetThrottleDelay(const sync_pb::ClientToServerResponse& response); | |
|
akalin
2011/08/10 01:24:36
change to return TimeDelta
lipalani1
2011/08/10 19:04:05
Done.
| |
| 119 | |
| 118 friend class SyncerProtoUtilTest; | 120 friend class SyncerProtoUtilTest; |
| 119 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday); | 121 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday); |
| 120 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders); | 122 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders); |
| 121 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); | 123 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); | 125 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace browser_sync | 128 } // namespace browser_sync |
| 127 | 129 |
| 128 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 130 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
| OLD | NEW |