| 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 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 routing_info[syncable::BOOKMARKS] = GROUP_UI; | 91 routing_info[syncable::BOOKMARKS] = GROUP_UI; |
| 92 routing_info[syncable::AUTOFILL] = GROUP_DB; | 92 routing_info[syncable::AUTOFILL] = GROUP_DB; |
| 93 routing_info[syncable::THEMES] = GROUP_UI; | 93 routing_info[syncable::THEMES] = GROUP_UI; |
| 94 routing_info[syncable::NIGORI] = GROUP_PASSIVE; | 94 routing_info[syncable::NIGORI] = GROUP_PASSIVE; |
| 95 registrar_.reset(new FakeModelSafeWorkerRegistrar(routing_info)); | 95 registrar_.reset(new FakeModelSafeWorkerRegistrar(routing_info)); |
| 96 connection_.reset(new MockConnectionManager(directory())); | 96 connection_.reset(new MockConnectionManager(directory())); |
| 97 connection_->SetServerReachable(); | 97 connection_->SetServerReachable(); |
| 98 context_ = new SyncSessionContext( | 98 context_ = new SyncSessionContext( |
| 99 connection_.get(), directory(), registrar_.get(), | 99 connection_.get(), directory(), registrar_.get(), |
| 100 &extensions_activity_monitor_, | 100 &extensions_activity_monitor_, |
| 101 std::vector<SyncEngineEventListener*>(), NULL); | 101 std::vector<SyncEngineEventListener*>(), NULL, NULL); |
| 102 context_->set_notifications_enabled(true); | 102 context_->set_notifications_enabled(true); |
| 103 context_->set_account_name("Test"); | 103 context_->set_account_name("Test"); |
| 104 scheduler_.reset( | 104 scheduler_.reset( |
| 105 new SyncScheduler("TestSyncScheduler", context_, syncer_)); | 105 new SyncScheduler("TestSyncScheduler", context_, syncer_)); |
| 106 } | 106 } |
| 107 | 107 |
| 108 SyncScheduler* scheduler() { return scheduler_.get(); } | 108 SyncScheduler* scheduler() { return scheduler_.get(); } |
| 109 MockSyncer* syncer() { return syncer_; } | 109 MockSyncer* syncer() { return syncer_; } |
| 110 MockDelayProvider* delay() { return delay_; } | 110 MockDelayProvider* delay() { return delay_; } |
| 111 MockConnectionManager* connection() { return connection_.get(); } | 111 MockConnectionManager* connection() { return connection_.get(); } |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 PumpLoop(); | 1158 PumpLoop(); |
| 1159 // Pump again to run job. | 1159 // Pump again to run job. |
| 1160 PumpLoop(); | 1160 PumpLoop(); |
| 1161 | 1161 |
| 1162 StopSyncScheduler(); | 1162 StopSyncScheduler(); |
| 1163 | 1163 |
| 1164 EXPECT_TRUE(expected == context()->previous_session_routing_info()); | 1164 EXPECT_TRUE(expected == context()->previous_session_routing_info()); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 } // namespace browser_sync | 1167 } // namespace browser_sync |
| OLD | NEW |