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

Unified Diff: webkit/chromeos/fileapi/remote_file_stream_writer.h

Issue 16010006: Move webkit/chromeos into webkit/browser/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « webkit/chromeos/fileapi/file_util_async.h ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/chromeos/fileapi/remote_file_stream_writer.h
diff --git a/webkit/chromeos/fileapi/remote_file_stream_writer.h b/webkit/chromeos/fileapi/remote_file_stream_writer.h
deleted file mode 100644
index 8f3336a6e53809b17633982739e89d8c3266aa68..0000000000000000000000000000000000000000
--- a/webkit/chromeos/fileapi/remote_file_stream_writer.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
-#define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
-
-#include "base/basictypes.h"
-#include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
-#include "webkit/browser/fileapi/file_stream_writer.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-
-namespace net {
-class IOBuffer;
-}
-
-namespace webkit_blob {
-class ShareableFileReference;
-}
-
-namespace fileapi {
-
-class RemoteFileSystemProxyInterface;
-
-// FileStreamWriter interface for writing to a file on remote file system.
-class RemoteFileStreamWriter : public fileapi::FileStreamWriter {
- public:
- // Creates a writer for a file on |remote_filesystem| with path url |url|
- // (like "filesystem:chrome-extension://id/external/special/drive/...") that
- // starts writing from |offset|. When invalid parameters are set, the first
- // call to Write() method fails.
- RemoteFileStreamWriter(
- const scoped_refptr<RemoteFileSystemProxyInterface>& remote_filesystem,
- const FileSystemURL& url,
- int64 offset);
- virtual ~RemoteFileStreamWriter();
-
- // FileWriter override.
- virtual int Write(net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) OVERRIDE;
- virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE;
- virtual int Flush(const net::CompletionCallback& callback) OVERRIDE;
-
- private:
- // Callback function to do the continuation of the work of the first Write()
- // call, which tries to open the local copy of the file before writing.
- void OnFileOpened(
- net::IOBuffer* buf,
- int buf_len,
- const net::CompletionCallback& callback,
- base::PlatformFileError open_result,
- const base::FilePath& local_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
- // Calls |pending_cancel_callback_|, assuming it is non-null.
- void InvokePendingCancelCallback(int result);
-
- scoped_refptr<RemoteFileSystemProxyInterface> remote_filesystem_;
- const FileSystemURL url_;
- const int64 initial_offset_;
- scoped_ptr<fileapi::FileStreamWriter> local_file_writer_;
- scoped_refptr<webkit_blob::ShareableFileReference> file_ref_;
- bool has_pending_create_snapshot_;
- net::CompletionCallback pending_cancel_callback_;
-
- base::WeakPtrFactory<RemoteFileStreamWriter> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteFileStreamWriter);
-};
-
-} // namespace fileapi
-
-#endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
« no previous file with comments | « webkit/chromeos/fileapi/file_util_async.h ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698