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

Unified Diff: chrome/browser/chromeos/drive/local_file_reader.h

Issue 211483004: Remove some PlatformFile instances from ChromeOS Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change FileStream destruction logic Created 6 years, 9 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/chromeos/drive/local_file_reader.h
diff --git a/chrome/browser/chromeos/drive/local_file_reader.h b/chrome/browser/chromeos/drive/local_file_reader.h
index 6577abdd6911443d60bb2d12c4c61d745b6b8337..0b824da1861a31153e7a4e74c648bb6d3ff8de20 100644
--- a/chrome/browser/chromeos/drive/local_file_reader.h
+++ b/chrome/browser/chromeos/drive/local_file_reader.h
@@ -8,8 +8,8 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
#include "net/base/completion_callback.h"
+#include "net/base/file_stream.h"
namespace base {
class FilePath;
@@ -18,7 +18,7 @@ class SequencedTaskRunner;
namespace net {
class IOBuffer;
-} // namespace
+} // namespace net
namespace drive {
namespace util {
@@ -49,18 +49,14 @@ class LocalFileReader {
const net::CompletionCallback& callback);
private:
- // The thin wrapper for the platform file to handle closing correctly.
- class ScopedPlatformFile;
+ void DidOpen(const net::CompletionCallback& callback,
+ int64 offset,
+ int error);
+ void DidSeek(const net::CompletionCallback& callback,
+ int64 offset,
+ int64 error);
- // Part of Open(). Called after the open() operation task running
- // on blocking pool.
- void OpenAfterBlockingPoolTask(
- const net::CompletionCallback& callback,
- ScopedPlatformFile* result_platform_file,
- int open_result);
-
- scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_;
- base::PlatformFile platform_file_;
+ net::FileStream file_stream_;
// Note: This should remain the last member so it'll be destroyed and
// invalidate the weak pointers before any other members are destroyed.
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/truncate_operation.cc ('k') | chrome/browser/chromeos/drive/local_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698