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

Side by Side Diff: sync/test/engine/mock_connection_manager.cc

Issue 23717047: Retry: sync: Gracefully handle early shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renames Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/test/engine/mock_connection_manager.h ('k') | sync/test/engine/syncer_command_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Mock ServerConnectionManager class for use in client regression tests. 5 // Mock ServerConnectionManager class for use in client regression tests.
6 6
7 #include "sync/test/engine/mock_connection_manager.h" 7 #include "sync/test/engine/mock_connection_manager.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 15 matching lines...) Expand all
26 using sync_pb::GetUpdatesMessage; 26 using sync_pb::GetUpdatesMessage;
27 using sync_pb::SyncEnums; 27 using sync_pb::SyncEnums;
28 28
29 namespace syncer { 29 namespace syncer {
30 30
31 using syncable::WriteTransaction; 31 using syncable::WriteTransaction;
32 32
33 static char kValidAuthToken[] = "AuthToken"; 33 static char kValidAuthToken[] = "AuthToken";
34 static char kCacheGuid[] = "kqyg7097kro6GSUod+GSg=="; 34 static char kCacheGuid[] = "kqyg7097kro6GSUod+GSg==";
35 35
36 MockConnectionManager::MockConnectionManager(syncable::Directory* directory) 36 MockConnectionManager::MockConnectionManager(syncable::Directory* directory,
37 : ServerConnectionManager("unused", 0, false, false), 37 CancelationSignal* signal)
38 : ServerConnectionManager("unused", 0, false, false, signal),
38 server_reachable_(true), 39 server_reachable_(true),
39 conflict_all_commits_(false), 40 conflict_all_commits_(false),
40 conflict_n_commits_(0), 41 conflict_n_commits_(0),
41 next_new_id_(10000), 42 next_new_id_(10000),
42 store_birthday_("Store BDay!"), 43 store_birthday_("Store BDay!"),
43 store_birthday_sent_(false), 44 store_birthday_sent_(false),
44 client_stuck_(false), 45 client_stuck_(false),
45 countdown_to_postbuffer_fail_(0), 46 countdown_to_postbuffer_fail_(0),
46 directory_(directory), 47 directory_(directory),
47 mid_commit_observer_(NULL), 48 mid_commit_observer_(NULL),
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 server_status_ = HttpResponse::SERVER_CONNECTION_OK; 727 server_status_ = HttpResponse::SERVER_CONNECTION_OK;
727 } 728 }
728 } 729 }
729 730
730 void MockConnectionManager::SetServerStatus( 731 void MockConnectionManager::SetServerStatus(
731 HttpResponse::ServerConnectionCode server_status) { 732 HttpResponse::ServerConnectionCode server_status) {
732 server_status_ = server_status; 733 server_status_ = server_status;
733 } 734 }
734 735
735 } // namespace syncer 736 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/test/engine/mock_connection_manager.h ('k') | sync/test/engine/syncer_command_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698