Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: chrome/test/sync/engine/mock_server_connection.h

Issue 246098: Sync: Remove pthreads from auth_watcher. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/test/sync/engine/mock_server_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/sync/engine/mock_server_connection.h
===================================================================
--- chrome/test/sync/engine/mock_server_connection.h (revision 28272)
+++ chrome/test/sync/engine/mock_server_connection.h (working copy)
@@ -109,6 +109,12 @@
void SetNewTimestamp(int64 ts);
void SetNewestTimestamp(int64 ts);
+ // For AUTHENTICATE responses.
+ void SetAuthenticationResponseInfo(const std::string& valid_auth_token,
+ const std::string& user_display_name,
+ const std::string& user_display_email,
+ const std::string& user_obfuscated_id);
+
void FailNextPostBufferToPathCall() { fail_next_postbuffer_ = true; }
// Simple inspectors.
@@ -144,6 +150,9 @@
// Functions to handle the various types of server request.
void ProcessGetUpdates(sync_pb::ClientToServerMessage* csm,
sync_pb::ClientToServerResponse* response);
+ void ProcessAuthenticate(sync_pb::ClientToServerMessage* csm,
+ sync_pb::ClientToServerResponse* response,
+ const std::string& auth_token);
void ProcessCommit(sync_pb::ClientToServerMessage* csm,
sync_pb::ClientToServerResponse* response_buffer);
// Locate the most recent update message for purpose of alteration.
@@ -190,6 +199,11 @@
TestCallbackFunction mid_commit_callback_function_;
MidCommitObserver* mid_commit_observer_;
+ // The AUTHENTICATE response we'll return for auth requests.
+ sync_pb::AuthenticateResponse auth_response_;
+ // What we use to determine if we should return SUCCESS or BAD_AUTH_TOKEN.
+ std::string valid_auth_token_;
+
scoped_ptr<sync_pb::ClientCommand> client_command_;
// The next value to use for the position_in_parent property.
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/test/sync/engine/mock_server_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698