| 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/register_app_task.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 drive_uploader_.reset(new drive::DriveUploader( | 51 drive_uploader_.reset(new drive::DriveUploader( |
| 52 fake_drive_service_.get(), base::MessageLoopProxy::current())); | 52 fake_drive_service_.get(), base::MessageLoopProxy::current())); |
| 53 | 53 |
| 54 fake_drive_service_helper_.reset(new FakeDriveServiceHelper( | 54 fake_drive_service_helper_.reset(new FakeDriveServiceHelper( |
| 55 fake_drive_service_.get(), drive_uploader_.get(), | 55 fake_drive_service_.get(), drive_uploader_.get(), |
| 56 kSyncRootFolderTitle)); | 56 kSyncRootFolderTitle)); |
| 57 | 57 |
| 58 context_.reset( | 58 context_.reset( |
| 59 new SyncEngineContext(fake_drive_service_.get(), | 59 new SyncEngineContext(fake_drive_service_.get(), |
| 60 drive_uploader_.get(), | 60 drive_uploader_.get(), |
| 61 base::MessageLoopProxy::current(), | |
| 62 base::MessageLoopProxy::current())); | 61 base::MessageLoopProxy::current())); |
| 63 | 62 |
| 64 ASSERT_EQ(google_apis::HTTP_CREATED, | 63 ASSERT_EQ(google_apis::HTTP_CREATED, |
| 65 fake_drive_service_helper_->AddOrphanedFolder( | 64 fake_drive_service_helper_->AddOrphanedFolder( |
| 66 kSyncRootFolderTitle, &sync_root_folder_id_)); | 65 kSyncRootFolderTitle, &sync_root_folder_id_)); |
| 67 } | 66 } |
| 68 | 67 |
| 69 virtual void TearDown() OVERRIDE { | 68 virtual void TearDown() OVERRIDE { |
| 70 context_.reset(); | 69 context_.reset(); |
| 71 fake_drive_service_.reset(); | 70 fake_drive_service_.reset(); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 308 |
| 310 CreateMetadataDatabase(db.Pass()); | 309 CreateMetadataDatabase(db.Pass()); |
| 311 RunRegisterAppTask(kAppID); | 310 RunRegisterAppTask(kAppID); |
| 312 | 311 |
| 313 EXPECT_EQ(1u, CountRegisteredAppRoot()); | 312 EXPECT_EQ(1u, CountRegisteredAppRoot()); |
| 314 EXPECT_TRUE(IsAppRegistered(kAppID)); | 313 EXPECT_TRUE(IsAppRegistered(kAppID)); |
| 315 } | 314 } |
| 316 | 315 |
| 317 } // namespace drive_backend | 316 } // namespace drive_backend |
| 318 } // namespace sync_file_system | 317 } // namespace sync_file_system |
| OLD | NEW |