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 "base/stl_util.h" | 5 #include "base/stl_util.h" |
6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
7 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" | 7 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" |
9 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 9 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
10 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 10 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 base::ThreadTaskRunnerHandle::Get().get(), | 52 base::ThreadTaskRunnerHandle::Get().get(), |
53 base::ThreadTaskRunnerHandle::Get().get()); | 53 base::ThreadTaskRunnerHandle::Get().get()); |
54 ASSERT_EQ( | 54 ASSERT_EQ( |
55 sync_file_system::SYNC_STATUS_OK, | 55 sync_file_system::SYNC_STATUS_OK, |
56 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); | 56 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); |
57 } | 57 } |
58 | 58 |
59 virtual void TearDown() { | 59 virtual void TearDown() { |
60 if (sync_context_.get()) | 60 if (sync_context_.get()) |
61 sync_context_->ShutdownOnUIThread(); | 61 sync_context_->ShutdownOnUIThread(); |
62 sync_context_ = NULL; | 62 sync_context_ = nullptr; |
63 | 63 |
64 file_system_.TearDown(); | 64 file_system_.TearDown(); |
65 | 65 |
66 // Make sure we don't leave the external filesystem. | 66 // Make sure we don't leave the external filesystem. |
67 // (CannedSyncableFileSystem::TearDown does not do this as there may be | 67 // (CannedSyncableFileSystem::TearDown does not do this as there may be |
68 // multiple syncable file systems registered for the name) | 68 // multiple syncable file systems registered for the name) |
69 RevokeSyncableFileSystem(); | 69 RevokeSyncableFileSystem(); |
70 } | 70 } |
71 | 71 |
72 protected: | 72 protected: |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 sync_file_system::SYNC_FILE_TYPE_DIRECTORY)); | 242 sync_file_system::SYNC_FILE_TYPE_DIRECTORY)); |
243 VerifyAndClearChange(URL(kPath1), | 243 VerifyAndClearChange(URL(kPath1), |
244 FileChange(FileChange::FILE_CHANGE_DELETE, | 244 FileChange(FileChange::FILE_CHANGE_DELETE, |
245 sync_file_system::SYNC_FILE_TYPE_DIRECTORY)); | 245 sync_file_system::SYNC_FILE_TYPE_DIRECTORY)); |
246 VerifyAndClearChange(URL(kPath2), | 246 VerifyAndClearChange(URL(kPath2), |
247 FileChange(FileChange::FILE_CHANGE_DELETE, | 247 FileChange(FileChange::FILE_CHANGE_DELETE, |
248 sync_file_system::SYNC_FILE_TYPE_FILE)); | 248 sync_file_system::SYNC_FILE_TYPE_FILE)); |
249 } | 249 } |
250 | 250 |
251 } // namespace sync_file_system | 251 } // namespace sync_file_system |
OLD | NEW |