OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 #include <stack> | 6 #include <stack> |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 kSyncRootFolderTitle)); | 77 kSyncRootFolderTitle)); |
78 | 78 |
79 remote_sync_service_.reset(new SyncEngine( | 79 remote_sync_service_.reset(new SyncEngine( |
80 drive_service.PassAs<drive::DriveServiceInterface>(), | 80 drive_service.PassAs<drive::DriveServiceInterface>(), |
81 uploader.Pass(), | 81 uploader.Pass(), |
82 file_task_runner_.get(), | 82 file_task_runner_.get(), |
83 NULL, NULL, NULL)); | 83 NULL, NULL, NULL)); |
84 remote_sync_service_->AddServiceObserver(this); | 84 remote_sync_service_->AddServiceObserver(this); |
85 remote_sync_service_->Initialize(base_dir_.path(), | 85 remote_sync_service_->Initialize(base_dir_.path(), |
86 base::MessageLoopProxy::current(), | 86 base::MessageLoopProxy::current(), |
| 87 true /* pass_service_to_worker */, |
87 in_memory_env_.get()); | 88 in_memory_env_.get()); |
88 remote_sync_service_->SetSyncEnabled(true); | 89 remote_sync_service_->SetSyncEnabled(true); |
89 | 90 |
90 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); | 91 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); |
91 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); | 92 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); |
92 } | 93 } |
93 | 94 |
94 virtual void TearDown() OVERRIDE { | 95 virtual void TearDown() OVERRIDE { |
95 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; | 96 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; |
96 for (iterator itr = file_systems_.begin(); | 97 for (iterator itr = file_systems_.begin(); |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 | 1576 |
1576 EXPECT_EQ(1u, CountApp()); | 1577 EXPECT_EQ(1u, CountApp()); |
1577 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1578 EXPECT_EQ(1u, CountLocalFile(app_id)); |
1578 | 1579 |
1579 EXPECT_EQ(2u, CountMetadata()); | 1580 EXPECT_EQ(2u, CountMetadata()); |
1580 EXPECT_EQ(2u, CountTracker()); | 1581 EXPECT_EQ(2u, CountTracker()); |
1581 } | 1582 } |
1582 | 1583 |
1583 } // namespace drive_backend | 1584 } // namespace drive_backend |
1584 } // namespace sync_file_system | 1585 } // namespace sync_file_system |
OLD | NEW |