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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ModelSafeRoutingInfo routing_info; | 44 ModelSafeRoutingInfo routing_info; |
45 std::vector<ModelSafeWorker*> workers; | 45 std::vector<ModelSafeWorker*> workers; |
46 | 46 |
47 GetModelSafeRoutingInfo(&routing_info); | 47 GetModelSafeRoutingInfo(&routing_info); |
48 GetWorkers(&workers); | 48 GetWorkers(&workers); |
49 | 49 |
50 context_.reset( | 50 context_.reset( |
51 new SyncSessionContext( | 51 new SyncSessionContext( |
52 NULL, NULL, routing_info, workers, &extensions_activity_monitor_, | 52 NULL, NULL, routing_info, workers, &extensions_activity_monitor_, |
53 throttled_data_type_tracker_.get(), | 53 throttled_data_type_tracker_.get(), |
54 std::vector<SyncEngineEventListener*>(), NULL, NULL)); | 54 std::vector<SyncEngineEventListener*>(), NULL, NULL, |
| 55 true /* enable keystore encryption */)); |
55 routes_.clear(); | 56 routes_.clear(); |
56 routes_[syncer::BOOKMARKS] = GROUP_UI; | 57 routes_[syncer::BOOKMARKS] = GROUP_UI; |
57 routes_[syncer::AUTOFILL] = GROUP_DB; | 58 routes_[syncer::AUTOFILL] = GROUP_DB; |
58 scoped_refptr<ModelSafeWorker> passive_worker( | 59 scoped_refptr<ModelSafeWorker> passive_worker( |
59 new FakeModelWorker(GROUP_PASSIVE)); | 60 new FakeModelWorker(GROUP_PASSIVE)); |
60 scoped_refptr<ModelSafeWorker> ui_worker( | 61 scoped_refptr<ModelSafeWorker> ui_worker( |
61 new FakeModelWorker(GROUP_UI)); | 62 new FakeModelWorker(GROUP_UI)); |
62 scoped_refptr<ModelSafeWorker> db_worker( | 63 scoped_refptr<ModelSafeWorker> db_worker( |
63 new FakeModelWorker(GROUP_DB)); | 64 new FakeModelWorker(GROUP_DB)); |
64 workers_.clear(); | 65 workers_.clear(); |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 492 |
492 ASSERT_EQ(3U, types_with_payloads.size()); | 493 ASSERT_EQ(3U, types_with_payloads.size()); |
493 EXPECT_EQ(types_with_payloads[syncer::BOOKMARKS], payload); | 494 EXPECT_EQ(types_with_payloads[syncer::BOOKMARKS], payload); |
494 EXPECT_EQ(types_with_payloads[syncer::PASSWORDS], payload); | 495 EXPECT_EQ(types_with_payloads[syncer::PASSWORDS], payload); |
495 EXPECT_EQ(types_with_payloads[syncer::AUTOFILL], payload); | 496 EXPECT_EQ(types_with_payloads[syncer::AUTOFILL], payload); |
496 } | 497 } |
497 | 498 |
498 } // namespace | 499 } // namespace |
499 } // namespace sessions | 500 } // namespace sessions |
500 } // namespace syncer | 501 } // namespace syncer |
OLD | NEW |