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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/read_file.h

Issue 301973007: [fsp] Fix crash when reading files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 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
Index: chrome/browser/chromeos/file_system_provider/operations/read_file.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/read_file.h b/chrome/browser/chromeos/file_system_provider/operations/read_file.h
index f3cccaec03886d9fe311623147422337f59a0752..746a67dd49e8fd2feee7771fce86713a5ce3926e 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/read_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/read_file.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_
#include "base/files/file.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/file_system_provider/operations/operation.h"
#include "chrome/browser/chromeos/file_system_provider/provided_file_system_info.h"
@@ -34,7 +35,7 @@ class ReadFile : public Operation {
extensions::EventRouter* event_router,
const ProvidedFileSystemInfo& file_system_info,
int file_handle,
- net::IOBuffer* buffer,
+ scoped_refptr<net::IOBuffer> buffer,
int64 offset,
int length,
const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback);
@@ -49,7 +50,7 @@ class ReadFile : public Operation {
private:
int file_handle_;
- net::IOBuffer* buffer_;
+ scoped_refptr<net::IOBuffer> buffer_;
int64 offset_;
int length_;
int64 current_offset_;

Powered by Google App Engine
This is Rietveld 408576698