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

Unified Diff: webkit/browser/fileapi/file_system_context.cc

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/file_system_context.cc
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index b5525226d4286c25837a6bb100dd8c7cefbae19a..2d82d64f6322db51d0a2366586d709cf5d5155d7 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -25,9 +25,6 @@
#include "webkit/browser/fileapi/isolated_mount_point_provider.h"
#include "webkit/browser/fileapi/mount_points.h"
#include "webkit/browser/fileapi/sandbox_mount_point_provider.h"
-#include "webkit/browser/fileapi/syncable/local_file_change_tracker.h"
-#include "webkit/browser/fileapi/syncable/local_file_sync_context.h"
-#include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
#include "webkit/browser/fileapi/test_mount_point_provider.h"
#include "webkit/browser/quota/quota_manager.h"
#include "webkit/browser/quota/special_storage_policy.h"
@@ -224,19 +221,7 @@ bool FileSystemContext::IsSandboxFileSystem(FileSystemType type) const {
const UpdateObserverList* FileSystemContext::GetUpdateObservers(
FileSystemType type) const {
- // Currently update observer is only available in SandboxMountPointProvider
- // and TestMountPointProvider.
- // TODO(kinuko): Probably GetUpdateObservers() virtual method should be
- // added to FileSystemMountPointProvider interface and be called like
- // other GetFoo() methods do.
- if (sandbox_provider_->CanHandleType(type))
- return sandbox_provider_->GetUpdateObservers(type);
- if (type != kFileSystemTypeTest)
- return NULL;
- FileSystemMountPointProvider* mount_point_provider =
- GetMountPointProvider(type);
- return static_cast<TestMountPointProvider*>(
- mount_point_provider)->GetUpdateObservers(type);
+ return GetMountPointProvider(type)->GetUpdateObservers(type);
}
const AccessObserverList* FileSystemContext::GetAccessObservers(
@@ -275,11 +260,7 @@ void FileSystemContext::OpenFileSystem(
return;
}
- GURL root_url;
- if (type == kFileSystemTypeSyncable)
- root_url = sync_file_system::GetSyncableFileSystemRootURI(origin_url);
- else
- root_url = GetFileSystemRootURI(origin_url, type);
+ GURL root_url = mount_point_provider->GetRootURI(origin_url, type);
kinuko 2013/07/08 12:31:20 Can't each mount point provider create the root_ur
nhiroki 2013/07/22 04:34:14 Done in http://crrev.com/211318/
std::string name = GetFileSystemName(origin_url, type);
mount_point_provider->OpenFileSystem(
@@ -343,26 +324,6 @@ scoped_ptr<FileStreamWriter> FileSystemContext::CreateFileStreamWriter(
return mount_point_provider->CreateFileStreamWriter(url, offset, this);
}
-void FileSystemContext::SetLocalFileChangeTracker(
- scoped_ptr<sync_file_system::LocalFileChangeTracker> tracker) {
- DCHECK(!change_tracker_.get());
- DCHECK(tracker.get());
- change_tracker_ = tracker.Pass();
- sandbox_provider_->AddFileUpdateObserver(
- kFileSystemTypeSyncable,
- change_tracker_.get(),
- task_runners_->file_task_runner());
- sandbox_provider_->AddFileChangeObserver(
- kFileSystemTypeSyncable,
- change_tracker_.get(),
- task_runners_->file_task_runner());
-}
-
-void FileSystemContext::set_sync_context(
- sync_file_system::LocalFileSyncContext* sync_context) {
- sync_context_ = sync_context;
-}
-
FileSystemURL FileSystemContext::CrackURL(const GURL& url) const {
return CrackFileSystemURL(FileSystemURL(url));
}
@@ -381,8 +342,6 @@ void FileSystemContext::EnableTemporaryFileSystemInIncognito() {
#endif
FileSystemContext::~FileSystemContext() {
- task_runners_->file_task_runner()->DeleteSoon(
- FROM_HERE, change_tracker_.release());
}
void FileSystemContext::DeleteOnCorrectThread() const {

Powered by Google App Engine
This is Rietveld 408576698