| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 140     *file_id = tracker.file_id(); | 140     *file_id = tracker.file_id(); | 
| 141     return true; | 141     return true; | 
| 142   } | 142   } | 
| 143 | 143 | 
| 144   SyncStatusCode RegisterApp(const std::string& app_id) { | 144   SyncStatusCode RegisterApp(const std::string& app_id) { | 
| 145     GURL origin = extensions::Extension::GetBaseURLFromExtensionId(app_id); | 145     GURL origin = extensions::Extension::GetBaseURLFromExtensionId(app_id); | 
| 146     if (!ContainsKey(file_systems_, app_id)) { | 146     if (!ContainsKey(file_systems_, app_id)) { | 
| 147       CannedSyncableFileSystem* file_system = new CannedSyncableFileSystem( | 147       CannedSyncableFileSystem* file_system = new CannedSyncableFileSystem( | 
| 148           origin, in_memory_env_.get(), | 148           origin, in_memory_env_.get(), | 
| 149           io_task_runner_.get(), file_task_runner_.get()); | 149           io_task_runner_.get(), file_task_runner_.get()); | 
| 150       file_system->SetUp(); | 150       file_system->SetUp(CannedSyncableFileSystem::QUOTA_DISABLED); | 
| 151 | 151 | 
| 152       SyncStatusCode status = SYNC_STATUS_UNKNOWN; | 152       SyncStatusCode status = SYNC_STATUS_UNKNOWN; | 
| 153       local_sync_service_->MaybeInitializeFileSystemContext( | 153       local_sync_service_->MaybeInitializeFileSystemContext( | 
| 154           origin, file_system->file_system_context(), | 154           origin, file_system->file_system_context(), | 
| 155           CreateResultReceiver(&status)); | 155           CreateResultReceiver(&status)); | 
| 156       base::RunLoop().RunUntilIdle(); | 156       base::RunLoop().RunUntilIdle(); | 
| 157       EXPECT_EQ(SYNC_STATUS_OK, status); | 157       EXPECT_EQ(SYNC_STATUS_OK, status); | 
| 158 | 158 | 
| 159       file_system->backend()->sync_context()-> | 159       file_system->backend()->sync_context()-> | 
| 160           set_mock_notify_changes_duration_in_sec(0); | 160           set_mock_notify_changes_duration_in_sec(0); | 
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 826 | 826 | 
| 827   EXPECT_EQ(1u, CountApp()); | 827   EXPECT_EQ(1u, CountApp()); | 
| 828   EXPECT_EQ(4u, CountLocalFile(app_id)); | 828   EXPECT_EQ(4u, CountLocalFile(app_id)); | 
| 829 | 829 | 
| 830   EXPECT_EQ(5u, CountMetadata()); | 830   EXPECT_EQ(5u, CountMetadata()); | 
| 831   EXPECT_EQ(5u, CountMetadata()); | 831   EXPECT_EQ(5u, CountMetadata()); | 
| 832 } | 832 } | 
| 833 | 833 | 
| 834 }  // namespace drive_backend | 834 }  // namespace drive_backend | 
| 835 }  // namespace sync_file_system | 835 }  // namespace sync_file_system | 
| OLD | NEW | 
|---|