| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 virtual void SetUp() { | 96 virtual void SetUp() { |
| 97 dir_maker_.SetUp(); | 97 dir_maker_.SetUp(); |
| 98 syncer_ = new MockSyncer(); | 98 syncer_ = new MockSyncer(); |
| 99 delay_ = NULL; | 99 delay_ = NULL; |
| 100 | 100 |
| 101 ModelSafeRoutingInfo routing_info; | 101 ModelSafeRoutingInfo routing_info; |
| 102 routing_info[BOOKMARKS] = GROUP_UI; | 102 routing_info[BOOKMARKS] = GROUP_UI; |
| 103 routing_info[AUTOFILL] = GROUP_DB; | 103 routing_info[AUTOFILL] = GROUP_DB; |
| 104 routing_info[THEMES] = GROUP_UI; | 104 routing_info[THEMES] = GROUP_UI; |
| 105 routing_info[NIGORI] = GROUP_PASSIVE; | 105 routing_info[NIGORI] = GROUP_CONTROL; |
| 106 | 106 |
| 107 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); | 107 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); |
| 108 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_DB))); | 108 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_DB))); |
| 109 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); | 109 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); |
| 110 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_CONTROL))); |
| 110 | 111 |
| 111 std::vector<ModelSafeWorker*> workers; | 112 std::vector<ModelSafeWorker*> workers; |
| 112 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = | 113 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = |
| 113 workers_.begin(); it != workers_.end(); ++it) { | 114 workers_.begin(); it != workers_.end(); ++it) { |
| 114 workers.push_back(it->get()); | 115 workers.push_back(it->get()); |
| 115 } | 116 } |
| 116 | 117 |
| 117 connection_.reset(new MockConnectionManager(directory())); | 118 connection_.reset(new MockConnectionManager(directory())); |
| 118 connection_->SetServerReachable(); | 119 connection_->SetServerReachable(); |
| 119 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 120 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // Should save the nudge for until after the server is reachable. | 1127 // Should save the nudge for until after the server is reachable. |
| 1127 MessageLoop::current()->RunAllPending(); | 1128 MessageLoop::current()->RunAllPending(); |
| 1128 | 1129 |
| 1129 connection()->SetServerReachable(); | 1130 connection()->SetServerReachable(); |
| 1130 connection()->UpdateConnectionStatus(); | 1131 connection()->UpdateConnectionStatus(); |
| 1131 scheduler()->OnConnectionStatusChange(); | 1132 scheduler()->OnConnectionStatusChange(); |
| 1132 MessageLoop::current()->RunAllPending(); | 1133 MessageLoop::current()->RunAllPending(); |
| 1133 } | 1134 } |
| 1134 | 1135 |
| 1135 } // namespace syncer | 1136 } // namespace syncer |
| OLD | NEW |