OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "chrome/browser/drive/drive_api_util.h" | 10 #include "chrome/browser/drive/drive_api_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual void SetUp() OVERRIDE { | 47 virtual void SetUp() OVERRIDE { |
48 ASSERT_TRUE(database_dir_.CreateUniqueTempDir()); | 48 ASSERT_TRUE(database_dir_.CreateUniqueTempDir()); |
49 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); | 49 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); |
50 | 50 |
51 scoped_ptr<drive::DriveServiceInterface> | 51 scoped_ptr<drive::DriveServiceInterface> |
52 fake_drive_service(new drive::FakeDriveService); | 52 fake_drive_service(new drive::FakeDriveService); |
53 | 53 |
54 sync_context_.reset(new SyncEngineContext( | 54 sync_context_.reset(new SyncEngineContext( |
55 fake_drive_service.Pass(), | 55 fake_drive_service.Pass(), |
56 scoped_ptr<drive::DriveUploaderInterface>(), | 56 scoped_ptr<drive::DriveUploaderInterface>(), |
| 57 NULL, |
57 base::MessageLoopProxy::current(), | 58 base::MessageLoopProxy::current(), |
58 base::MessageLoopProxy::current(), | 59 base::MessageLoopProxy::current(), |
59 base::MessageLoopProxy::current())); | 60 base::MessageLoopProxy::current())); |
60 | 61 |
61 sync_task_manager_.reset(new SyncTaskManager( | 62 sync_task_manager_.reset(new SyncTaskManager( |
62 base::WeakPtr<SyncTaskManager::Client>(), | 63 base::WeakPtr<SyncTaskManager::Client>(), |
63 1 /* maximum_parallel_task */)); | 64 1 /* maximum_parallel_task */)); |
64 sync_task_manager_->Initialize(SYNC_STATUS_OK); | 65 sync_task_manager_->Initialize(SYNC_STATUS_OK); |
65 } | 66 } |
66 | 67 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 352 |
352 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); | 353 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); |
353 EXPECT_FALSE(HasNoParent(sync_root->file_id())); | 354 EXPECT_FALSE(HasNoParent(sync_root->file_id())); |
354 | 355 |
355 EXPECT_EQ(1u, CountFileMetadata()); | 356 EXPECT_EQ(1u, CountFileMetadata()); |
356 EXPECT_EQ(1u, CountFileTracker()); | 357 EXPECT_EQ(1u, CountFileTracker()); |
357 } | 358 } |
358 | 359 |
359 } // namespace drive_backend | 360 } // namespace drive_backend |
360 } // namespace sync_file_system | 361 } // namespace sync_file_system |
OLD | NEW |