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

Unified Diff: components/nacl/loader/nacl_listener.h

Issue 1010183002: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address all comments Created 5 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/loader/nacl_ipc_adapter.cc ('k') | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.h
diff --git a/components/nacl/loader/nacl_listener.h b/components/nacl/loader/nacl_listener.h
index eccbc1925b752aa9d80d0eb45b9cbf43e12a2448..8abfafc79708fe597cff2d53c482c602fff80605 100644
--- a/components/nacl/loader/nacl_listener.h
+++ b/components/nacl/loader/nacl_listener.h
@@ -5,6 +5,7 @@
#ifndef CHROME_NACL_NACL_LISTENER_H_
#define CHROME_NACL_NACL_LISTENER_H_
+#include <map>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -65,6 +66,14 @@ class NaClListener : public IPC::Listener {
private:
bool OnMessageReceived(const IPC::Message& msg) override;
+ typedef base::Callback<void(const IPC::Message&,
+ IPC::PlatformFileForTransit,
+ base::FilePath)> OpenResourceReplyCallback;
+
+ bool OnOpenResource(const IPC::Message& msg,
+ const std::string& key,
+ OpenResourceReplyCallback cb);
+
void OnStart(const nacl::NaClStartParams& params);
// A channel back to the browser.
@@ -97,6 +106,12 @@ class NaClListener : public IPC::Listener {
// Used to identify what thread we're on.
base::MessageLoop* main_loop_;
+ typedef std::map<
+ std::string, // manifest key
+ std::pair<IPC::PlatformFileForTransit,
+ base::FilePath> > PrefetchedResourceFilesMap;
+ PrefetchedResourceFilesMap prefetched_resource_files_;
+
DISALLOW_COPY_AND_ASSIGN(NaClListener);
};
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698