OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 MockConnectionManager::MockConnectionManager(syncable::Directory* directory) | 37 MockConnectionManager::MockConnectionManager(syncable::Directory* directory) |
38 : ServerConnectionManager("unused", 0, false), | 38 : ServerConnectionManager("unused", 0, false), |
39 server_reachable_(true), | 39 server_reachable_(true), |
40 conflict_all_commits_(false), | 40 conflict_all_commits_(false), |
41 conflict_n_commits_(0), | 41 conflict_n_commits_(0), |
42 next_new_id_(10000), | 42 next_new_id_(10000), |
43 store_birthday_("Store BDay!"), | 43 store_birthday_("Store BDay!"), |
44 store_birthday_sent_(false), | 44 store_birthday_sent_(false), |
45 client_stuck_(false), | 45 client_stuck_(false), |
46 commit_time_rename_prepended_string_(""), | |
47 countdown_to_postbuffer_fail_(0), | 46 countdown_to_postbuffer_fail_(0), |
48 directory_(directory), | 47 directory_(directory), |
49 mid_commit_observer_(NULL), | 48 mid_commit_observer_(NULL), |
50 throttling_(false), | 49 throttling_(false), |
51 fail_with_auth_invalid_(false), | 50 fail_with_auth_invalid_(false), |
52 fail_non_periodic_get_updates_(false), | 51 fail_non_periodic_get_updates_(false), |
53 gu_client_command_(NULL), | 52 gu_client_command_(NULL), |
54 commit_client_command_(NULL), | 53 commit_client_command_(NULL), |
55 next_position_in_parent_(2), | 54 next_position_in_parent_(2), |
56 use_legacy_bookmarks_protocol_(false), | 55 use_legacy_bookmarks_protocol_(false), |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 730 |
732 void MockConnectionManager::UpdateConnectionStatus() { | 731 void MockConnectionManager::UpdateConnectionStatus() { |
733 if (!server_reachable_) { | 732 if (!server_reachable_) { |
734 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; | 733 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; |
735 } else { | 734 } else { |
736 server_status_ = HttpResponse::SERVER_CONNECTION_OK; | 735 server_status_ = HttpResponse::SERVER_CONNECTION_OK; |
737 } | 736 } |
738 } | 737 } |
739 | 738 |
740 } // namespace syncer | 739 } // namespace syncer |
OLD | NEW |