Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/local/local_file_sync_context.h" 5 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 file_error_(base::File::FILE_ERROR_FAILED), 66 file_error_(base::File::FILE_ERROR_FAILED),
67 async_modify_finished_(false), 67 async_modify_finished_(false),
68 has_inflight_prepare_for_sync_(false) {} 68 has_inflight_prepare_for_sync_(false) {}
69 69
70 void SetUp() override { 70 void SetUp() override {
71 RegisterSyncableFileSystem(); 71 RegisterSyncableFileSystem();
72 ASSERT_TRUE(dir_.CreateUniqueTempDir()); 72 ASSERT_TRUE(dir_.CreateUniqueTempDir());
73 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); 73 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
74 74
75 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 75 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get();
76 io_task_runner_ = BrowserThread::GetMessageLoopProxyForThread( 76 io_task_runner_ = BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
77 BrowserThread::IO); 77 file_task_runner_ =
78 file_task_runner_ = BrowserThread::GetMessageLoopProxyForThread( 78 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
79 BrowserThread::IO);
80 } 79 }
81 80
82 void TearDown() override { RevokeSyncableFileSystem(); } 81 void TearDown() override { RevokeSyncableFileSystem(); }
83 82
84 void StartPrepareForSync(FileSystemContext* file_system_context, 83 void StartPrepareForSync(FileSystemContext* file_system_context,
85 const FileSystemURL& url, 84 const FileSystemURL& url,
86 LocalFileSyncContext::SyncMode sync_mode, 85 LocalFileSyncContext::SyncMode sync_mode,
87 SyncFileMetadata* metadata, 86 SyncFileMetadata* metadata,
88 FileChangeList* changes, 87 FileChangeList* changes,
89 storage::ScopedFile* snapshot) { 88 storage::ScopedFile* snapshot) {
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 954
956 // Make sure kDir and kFile are created by ApplyRemoteChange. 955 // Make sure kDir and kFile are created by ApplyRemoteChange.
957 EXPECT_EQ(base::File::FILE_OK, file_system.FileExists(kFile)); 956 EXPECT_EQ(base::File::FILE_OK, file_system.FileExists(kFile));
958 EXPECT_EQ(base::File::FILE_OK, file_system.DirectoryExists(kDir)); 957 EXPECT_EQ(base::File::FILE_OK, file_system.DirectoryExists(kDir));
959 958
960 sync_context_->ShutdownOnUIThread(); 959 sync_context_->ShutdownOnUIThread();
961 file_system.TearDown(); 960 file_system.TearDown();
962 } 961 }
963 962
964 } // namespace sync_file_system 963 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698