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

Unified Diff: components/nacl/browser/pnacl_host.h

Issue 307173002: Remove PlatformFile from components/nacl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update NexeFdCallback definition 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
« no previous file with comments | « components/nacl/browser/nacl_host_message_filter.cc ('k') | components/nacl/browser/pnacl_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/pnacl_host.h
diff --git a/components/nacl/browser/pnacl_host.h b/components/nacl/browser/pnacl_host.h
index c013a4f39ff6e578b6d8e1286c6507f52a8cba48..d44d4b5cc5cc42cb200f222771005323dc8c60b1 100644
--- a/components/nacl/browser/pnacl_host.h
+++ b/components/nacl/browser/pnacl_host.h
@@ -32,7 +32,7 @@ class PnaclTranslationCache;
class PnaclHost {
public:
typedef base::Callback<void(base::File)> TempFileCallback;
- typedef base::Callback<void(base::PlatformFile, bool is_hit)> NexeFdCallback;
+ typedef base::Callback<void(const base::File&, bool is_hit)> NexeFdCallback;
static PnaclHost* GetInstance();
@@ -102,6 +102,7 @@ class PnaclHost {
// so that the BrowsingDataRemover can clear it even if no translation has
// ever been started.
friend struct DefaultSingletonTraits<PnaclHost>;
+ friend class FileProxy;
friend class pnacl::PnaclHostTest;
friend class pnacl::PnaclHostTestDisk;
enum CacheState {
@@ -115,7 +116,7 @@ class PnaclHost {
~PendingTranslation();
base::ProcessHandle process_handle;
int render_view_id;
- base::PlatformFile nexe_fd;
+ base::File* nexe_fd;
bool got_nexe_fd;
bool got_cache_reply;
bool got_cache_hit;
@@ -149,16 +150,16 @@ class PnaclHost {
// GetNexeFd miss path
void ReturnMiss(const PendingTranslationMap::iterator& entry);
static scoped_refptr<net::DrainableIOBuffer> CopyFileToBuffer(
- base::PlatformFile fd);
+ scoped_ptr<base::File> file);
void StoreTranslatedNexe(TranslationID id,
scoped_refptr<net::DrainableIOBuffer>);
void OnTranslatedNexeStored(const TranslationID& id, int net_error);
void RequeryMatchingTranslations(const std::string& key);
// GetNexeFd hit path
- static int CopyBufferToFile(base::PlatformFile fd,
- scoped_refptr<net::DrainableIOBuffer> buffer);
- void OnBufferCopiedToTempFile(const TranslationID& id, int file_error);
+ void OnBufferCopiedToTempFile(const TranslationID& id,
+ scoped_ptr<base::File> file,
+ int file_error);
void OnEntriesDoomed(const base::Closure& callback, int net_error);
« no previous file with comments | « components/nacl/browser/nacl_host_message_filter.cc ('k') | components/nacl/browser/pnacl_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698