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

Unified Diff: chrome/browser/renderer_host/redirect_to_file_resource_handler.h

Issue 2878062: Asynchronously open the temp file used for Pepper StreamToFile, and delete th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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: chrome/browser/renderer_host/redirect_to_file_resource_handler.h
===================================================================
--- chrome/browser/renderer_host/redirect_to_file_resource_handler.h (revision 54397)
+++ chrome/browser/renderer_host/redirect_to_file_resource_handler.h (working copy)
@@ -6,14 +6,18 @@
#define CHROME_BROWSER_RENDERER_HOST_REDIRECT_TO_FILE_RESOURCE_HANDLER_H_
#include "base/file_path.h"
+#include "base/platform_file.h"
#include "base/ref_counted.h"
+#include "base/scoped_callback_factory.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/renderer_host/resource_handler.h"
#include "net/base/completion_callback.h"
-#include "net/base/file_stream.h"
+class RefCountedPlatformFile;
class ResourceDispatcherHost;
namespace net {
+class FileStream;
class GrowableIOBuffer;
}
@@ -42,10 +46,14 @@
private:
virtual ~RedirectToFileResourceHandler();
+ void DidCreateTemporaryFile(base::PassPlatformFile file_handle,
+ FilePath file_path);
void DidWriteToFile(int result);
bool WriteMore();
bool BufIsFull() const;
+ base::ScopedCallbackFactory<RedirectToFileResourceHandler> callback_factory_;
+
ResourceDispatcherHost* host_;
scoped_refptr<ResourceHandler> next_handler_;
int process_id_;
@@ -63,7 +71,7 @@
int write_cursor_;
FilePath file_path_;
- net::FileStream file_stream_;
+ scoped_ptr<net::FileStream> file_stream_;
net::CompletionCallbackImpl<RedirectToFileResourceHandler> write_callback_;
bool write_callback_pending_;
« no previous file with comments | « chrome/browser/file_system_proxy.cc ('k') | chrome/browser/renderer_host/redirect_to_file_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698