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

Unified Diff: webkit/browser/fileapi/syncable/syncable_file_system_operation.cc

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lazy initialization Created 7 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 side-by-side diff with in-line comments
Download patch
Index: webkit/browser/fileapi/syncable/syncable_file_system_operation.cc
diff --git a/webkit/browser/fileapi/syncable/syncable_file_system_operation.cc b/webkit/browser/fileapi/syncable/syncable_file_system_operation.cc
index 67738096750b4655b863903e33d5a5ec8ceaf41c..76feb2098ca6103e812ce4c66d30302304585af3 100644
--- a/webkit/browser/fileapi/syncable/syncable_file_system_operation.cc
+++ b/webkit/browser/fileapi/syncable/syncable_file_system_operation.cc
@@ -12,6 +12,7 @@
#include "webkit/browser/fileapi/local_file_system_operation.h"
#include "webkit/browser/fileapi/sandbox_file_system_backend.h"
#include "webkit/browser/fileapi/syncable/local_file_sync_context.h"
+#include "webkit/browser/fileapi/syncable/sync_file_system_backend.h"
#include "webkit/browser/fileapi/syncable/syncable_file_operation_runner.h"
#include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
#include "webkit/common/blob/shareable_file_reference.h"
@@ -318,13 +319,16 @@ SyncableFileSystemOperation::SyncableFileSystemOperation(
operation_context.Pass()),
url_(url) {
DCHECK(file_system_context);
- if (!file_system_context->sync_context()) {
+ SyncFileSystemBackend* backend =
+ SyncFileSystemBackend::GetBackend(file_system_context);
+ DCHECK(backend);
+ if (!backend->sync_context()) {
// Syncable FileSystem is opened in a file system context which doesn't
// support (or is not initialized for) the API.
// Returning here to leave operation_runner_ as NULL.
return;
}
- operation_runner_ = file_system_context->sync_context()->operation_runner();
+ operation_runner_ = backend->sync_context()->operation_runner();
is_directory_operation_enabled_ = IsSyncFSDirectoryOperationEnabled();
}

Powered by Google App Engine
This is Rietveld 408576698