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

Unified Diff: trunk/src/content/browser/fileapi/fileapi_message_filter.h

Issue 60323002: Revert 232547 "Pepper: Move FileIO host from renderer to browser." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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: trunk/src/content/browser/fileapi/fileapi_message_filter.h
===================================================================
--- trunk/src/content/browser/fileapi/fileapi_message_filter.h (revision 233010)
+++ trunk/src/content/browser/fileapi/fileapi_message_filter.h (working copy)
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/files/file_util_proxy.h"
+#include "base/id_map.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "base/platform_file.h"
@@ -121,6 +122,12 @@
const base::Time& last_access_time,
const base::Time& last_modified_time);
void OnCancel(int request_id, int request_to_cancel);
+#if defined(ENABLE_PLUGINS)
+ void OnOpenPepperFile(int request_id, const GURL& path, int pp_open_flags);
+#endif // defined(ENABLE_PLUGINS)
+ void OnNotifyCloseFile(int file_open_id);
+ void OnWillUpdate(const GURL& path);
+ void OnDidUpdate(const GURL& path, int64 delta);
void OnSyncGetPlatformPath(const GURL& path,
base::FilePath* platform_path);
void OnCreateSnapshotFile(int request_id,
@@ -171,6 +178,12 @@
base::PlatformFileError result,
const std::vector<fileapi::DirectoryEntry>& entries,
bool has_more);
+ void DidOpenFile(int request_id,
+ quota::QuotaLimitType quota_policy,
+ base::PlatformFileError result,
+ base::PlatformFile file,
+ const base::Closure& on_close_callback,
+ base::ProcessHandle peer_handle);
void DidWrite(int request_id,
base::PlatformFileError result,
int64 bytes,
@@ -239,6 +252,11 @@
std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> >
in_transit_snapshot_files_;
+ // Keep track of file system file opened by OpenFile() in this process.
+ // Need to close all of them when the renderer process dies.
+ typedef IDMap<base::Closure, IDMapOwnPointer> OnCloseCallbackMap;
+ OnCloseCallbackMap on_close_callbacks_;
+
DISALLOW_COPY_AND_ASSIGN(FileAPIMessageFilter);
};

Powered by Google App Engine
This is Rietveld 408576698