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 |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "sync/engine/syncer_proto_util.h" | 13 #include "sync/engine/syncer_proto_util.h" |
14 #include "sync/test/engine/test_id_factory.h" | |
15 #include "sync/protocol/bookmark_specifics.pb.h" | 14 #include "sync/protocol/bookmark_specifics.pb.h" |
16 #include "sync/syncable/directory.h" | 15 #include "sync/syncable/directory.h" |
17 #include "sync/syncable/syncable_write_transaction.h" | 16 #include "sync/syncable/syncable_write_transaction.h" |
18 #include "sync/test/engine/test_id_factory.h" | 17 #include "sync/test/engine/test_id_factory.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
20 | 19 |
21 using std::find; | 20 using std::find; |
22 using std::map; | 21 using std::map; |
23 using std::string; | 22 using std::string; |
24 using sync_pb::ClientToServerMessage; | 23 using sync_pb::ClientToServerMessage; |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 | 729 |
731 void MockConnectionManager::UpdateConnectionStatus() { | 730 void MockConnectionManager::UpdateConnectionStatus() { |
732 if (!server_reachable_) { | 731 if (!server_reachable_) { |
733 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; | 732 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; |
734 } else { | 733 } else { |
735 server_status_ = HttpResponse::SERVER_CONNECTION_OK; | 734 server_status_ = HttpResponse::SERVER_CONNECTION_OK; |
736 } | 735 } |
737 } | 736 } |
738 | 737 |
739 } // namespace syncer | 738 } // namespace syncer |
OLD | NEW |