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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_context.cc

Issue 145693005: [FileAPI] Replace default leveldb::Env with leveldb::MemEnv in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/local/local_file_sync_context.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.cc b/chrome/browser/sync_file_system/local/local_file_sync_context.cc
index 891a54fc87bf9e1564d46976b38b1faf7f99fa67..eb12b8751188ac893459b9816ab77ba179751c87 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context.cc
@@ -47,9 +47,11 @@ const base::FilePath::CharType kSnapshotDir[] = FILE_PATH_LITERAL("snapshots");
LocalFileSyncContext::LocalFileSyncContext(
const base::FilePath& base_path,
+ leveldb::Env* env_override,
base::SingleThreadTaskRunner* ui_task_runner,
base::SingleThreadTaskRunner* io_task_runner)
: local_base_path_(base_path.Append(FILE_PATH_LITERAL("local"))),
+ env_override_(env_override),
ui_task_runner_(ui_task_runner),
io_task_runner_(io_task_runner),
shutdown_on_ui_(false),
@@ -679,6 +681,7 @@ SyncStatusCode LocalFileSyncContext::InitializeChangeTrackerOnFileThread(
DCHECK(origins_with_changes);
tracker_ptr->reset(new LocalFileChangeTracker(
file_system_context->partition_path(),
+ env_override_,
file_system_context->default_file_task_runner()));
const SyncStatusCode status = (*tracker_ptr)->Initialize(file_system_context);
if (status != SYNC_STATUS_OK)

Powered by Google App Engine
This is Rietveld 408576698