diff options
author | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 19:08:20 +0000 |
---|---|---|
committer | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 19:08:20 +0000 |
commit | 16dd6e258292b24af7fc5625543e52651c92ce50 (patch) | |
tree | 7528b35d03aa90505a407b04aa7c734aeda5ee3d /content/common/file_system/webfilewriter_impl.cc | |
parent | 3d7e97a0290ab41e770b5c67a8a2a2871c9c32b4 (diff) | |
download | chromium_src-16dd6e258292b24af7fc5625543e52651c92ce50.zip chromium_src-16dd6e258292b24af7fc5625543e52651c92ce50.tar.gz chromium_src-16dd6e258292b24af7fc5625543e52651c92ce50.tar.bz2 |
Rename content/{common,browser}/file_system to fileapi and move blob stuff into it.
This patch:
- renames content/{common,browser]/file_system to content/{common,browser}/fileapi,
- moves content/browser/chrome_blob_storage_context.{h,cc} into content/browser/fileapi,
- moves content/common/webblob_registry_impl.{h,cc} into content/common/fileapi,
- moves content/common/{file_system_messages.h,webblob_messages.h} into content/common/fileapi,
- adds jianli@ to OWNERS of content/{browser,common}/fileapi,
- rename FileAndBlobMessageFilter to FileAPIMessageFilter.
BUG=115603
TEST='Build should finish successfully'
Review URL: http://codereview.chromium.org/9558006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/file_system/webfilewriter_impl.cc')
-rw-r--r-- | content/common/file_system/webfilewriter_impl.cc | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/content/common/file_system/webfilewriter_impl.cc b/content/common/file_system/webfilewriter_impl.cc deleted file mode 100644 index d42caa5..0000000 --- a/content/common/file_system/webfilewriter_impl.cc +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/common/file_system/webfilewriter_impl.h" - -#include "content/common/child_thread.h" -#include "content/common/file_system/file_system_dispatcher.h" - -namespace { - -inline FileSystemDispatcher* GetFileSystemDispatcher() { - return ChildThread::current()->file_system_dispatcher(); -} -} - -class WebFileWriterImpl::CallbackDispatcher - : public fileapi::FileSystemCallbackDispatcher { - public: - explicit CallbackDispatcher( - const base::WeakPtr<WebFileWriterImpl>& writer) : writer_(writer) { - } - virtual ~CallbackDispatcher() { - } - - virtual void DidReadMetadata(const base::PlatformFileInfo&, const FilePath&) { - NOTREACHED(); - } - virtual void DidReadDirectory( - const std::vector<base::FileUtilProxy::Entry>& entries, - bool has_more) { - NOTREACHED(); - } - virtual void DidOpenFileSystem(const std::string& name, - const GURL& root) { - NOTREACHED(); - } - virtual void DidSucceed() { - if (writer_) - writer_->DidSucceed(); - } - virtual void DidFail(base::PlatformFileError error_code) { - if (writer_) - writer_->DidFail(error_code); - } - virtual void DidWrite(int64 bytes, bool complete) { - if (writer_) - writer_->DidWrite(bytes, complete); - } - - private: - base::WeakPtr<WebFileWriterImpl> writer_; -}; - -WebFileWriterImpl::WebFileWriterImpl( - const GURL& path, WebKit::WebFileWriterClient* client) - : WebFileWriterBase(path, client), - request_id_(0) { -} - -WebFileWriterImpl::~WebFileWriterImpl() { -} - -void WebFileWriterImpl::DoTruncate(const GURL& path, int64 offset) { - // The FileSystemDispatcher takes ownership of the CallbackDispatcher. - GetFileSystemDispatcher()->Truncate(path, offset, &request_id_, - new CallbackDispatcher(AsWeakPtr())); -} - -void WebFileWriterImpl::DoWrite( - const GURL& path, const GURL& blob_url, int64 offset) { - GetFileSystemDispatcher()->Write( - path, blob_url, offset, &request_id_, - new CallbackDispatcher(AsWeakPtr())); -} - -void WebFileWriterImpl::DoCancel() { - GetFileSystemDispatcher()->Cancel(request_id_, - new CallbackDispatcher(AsWeakPtr())); -} |