| 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 "sync/sessions/sync_session.h" | 5 #include "sync/sessions/sync_session.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 std::vector<ModelSafeWorker*> workers; | 36 std::vector<ModelSafeWorker*> workers; |
| 37 GetWorkers(&workers); | 37 GetWorkers(&workers); |
| 38 return new SyncSession(context_.get(), this, SyncSourceInfo(), | 38 return new SyncSession(context_.get(), this, SyncSourceInfo(), |
| 39 routes_, workers); | 39 routes_, workers); |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual void SetUp() { | 42 virtual void SetUp() { |
| 43 context_.reset( | 43 context_.reset( |
| 44 new SyncSessionContext( | 44 new SyncSessionContext( |
| 45 NULL, NULL, this, &extensions_activity_monitor_, | 45 NULL, NULL, this, &extensions_activity_monitor_, |
| 46 std::vector<SyncEngineEventListener*>(), NULL)); | 46 std::vector<SyncEngineEventListener*>(), NULL, NULL)); |
| 47 routes_.clear(); | 47 routes_.clear(); |
| 48 routes_[syncable::BOOKMARKS] = GROUP_UI; | 48 routes_[syncable::BOOKMARKS] = GROUP_UI; |
| 49 routes_[syncable::AUTOFILL] = GROUP_DB; | 49 routes_[syncable::AUTOFILL] = GROUP_DB; |
| 50 scoped_refptr<ModelSafeWorker> passive_worker( | 50 scoped_refptr<ModelSafeWorker> passive_worker( |
| 51 new FakeModelWorker(GROUP_PASSIVE)); | 51 new FakeModelWorker(GROUP_PASSIVE)); |
| 52 scoped_refptr<ModelSafeWorker> ui_worker( | 52 scoped_refptr<ModelSafeWorker> ui_worker( |
| 53 new FakeModelWorker(GROUP_UI)); | 53 new FakeModelWorker(GROUP_UI)); |
| 54 scoped_refptr<ModelSafeWorker> db_worker( | 54 scoped_refptr<ModelSafeWorker> db_worker( |
| 55 new FakeModelWorker(GROUP_DB)); | 55 new FakeModelWorker(GROUP_DB)); |
| 56 workers_.clear(); | 56 workers_.clear(); |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); | 587 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); |
| 588 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); | 588 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); |
| 589 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); | 589 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); |
| 590 EXPECT_EQ(payload2, original[syncable::SESSIONS]); | 590 EXPECT_EQ(payload2, original[syncable::SESSIONS]); |
| 591 EXPECT_EQ(payload3, original[syncable::THEMES]); | 591 EXPECT_EQ(payload3, original[syncable::THEMES]); |
| 592 } | 592 } |
| 593 | 593 |
| 594 } // namespace | 594 } // namespace |
| 595 } // namespace sessions | 595 } // namespace sessions |
| 596 } // namespace browser_sync | 596 } // namespace browser_sync |
| OLD | NEW |