Chromium Code Reviews| Index: sync/test/fake_server/fake_server.h |
| diff --git a/sync/test/fake_server/fake_server.h b/sync/test/fake_server/fake_server.h |
| index 21fb9635e63f3ad8e7a6ef3b2188fb39062acd9f..eaca1161e1d00c8072dcd103bc4ab4efcba360ac 100644 |
| --- a/sync/test/fake_server/fake_server.h |
| +++ b/sync/test/fake_server/fake_server.h |
| @@ -51,6 +51,12 @@ class FakeServer { |
| int* response_code, |
| std::string* response); |
| + // Helpers for fetching the last Commit or Getupdates messages, respectively. |
|
maxbogue
2016/04/01 22:30:48
s/Getupdates/GetUpdates
Nicolas Zea
2016/04/04 19:57:31
Done.
|
| + // Returns true if the specified message existed, and false if no message has |
| + // been received. |
| + bool GetLastCommitMessage(sync_pb::ClientToServerMessage* message); |
| + bool GetLastGetUpdatesMessage(sync_pb::ClientToServerMessage* message); |
| + |
| // Creates a DicionaryValue representation of all entities present in the |
| // server. The dictionary keys are the strings generated by ModelTypeToString |
| // and the values are ListValues containing StringValue versions of entity |
| @@ -246,6 +252,10 @@ class FakeServer { |
| // on every request. This is used to simulate a network failure on the client. |
| bool network_enabled_; |
| + // The last received client to server messages. |
| + sync_pb::ClientToServerMessage last_commit_message_; |
| + sync_pb::ClientToServerMessage last_getupdates_message_; |
| + |
| // Used to verify that FakeServer is only used from one thread. |
| base::ThreadChecker thread_checker_; |