| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ | 5 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| 6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ | 6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 void ClearSession() { | 118 void ClearSession() { |
| 119 session_.reset(); | 119 session_.reset(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void ResetContext() { | 122 void ResetContext() { |
| 123 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 123 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
| 124 context_.reset(new sessions::SyncSessionContext( | 124 context_.reset(new sessions::SyncSessionContext( |
| 125 mock_server_.get(), directory(), | 125 mock_server_.get(), directory(), |
| 126 routing_info_, GetWorkers(), &extensions_activity_monitor_, | 126 GetWorkers(), &extensions_activity_monitor_, |
| 127 throttled_data_type_tracker_.get(), | 127 throttled_data_type_tracker_.get(), |
| 128 std::vector<SyncEngineEventListener*>(), | 128 std::vector<SyncEngineEventListener*>(), |
| 129 &mock_debug_info_getter_, | 129 &mock_debug_info_getter_, |
| 130 &traffic_recorder_)); | 130 &traffic_recorder_)); |
| 131 context_->set_account_name(directory()->name()); | 131 context_->set_account_name(directory()->name()); |
| 132 ClearSession(); | 132 ClearSession(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Install a MockServerConnection. Resets the context. By default, | 135 // Install a MockServerConnection. Resets the context. By default, |
| 136 // the context does not have a MockServerConnection attached. | 136 // the context does not have a MockServerConnection attached. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 virtual void SetUp() OVERRIDE; | 228 virtual void SetUp() OVERRIDE; |
| 229 | 229 |
| 230 TestUnrecoverableErrorHandler handler_; | 230 TestUnrecoverableErrorHandler handler_; |
| 231 syncable::MockDirectory mock_directory_; | 231 syncable::MockDirectory mock_directory_; |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 } // namespace syncer | 234 } // namespace syncer |
| 235 | 235 |
| 236 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ | 236 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| OLD | NEW |