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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h

Issue 9355051: Plumb through cache_identity from manifest for first sketch of pnacl cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 years, 10 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: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
index b6ed522fd4d63fb395984a1e2ae24290c9f53708..cab350c27f7fecb663183eb2943c13441e2e8fea 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
@@ -46,7 +46,7 @@ class PnaclCoordinator;
// written by: llc (passed in explicitly through SRPC)
// read by: ld (returned via lookup service from SRPC)
// PnaclCoordinator::nexe_file_:
-// written by: lc (passed in explicitly through SRPC)
+// written by: ld (passed in explicitly through SRPC)
sehr (please use chromium) 2012/02/22 19:30:37 thanks for fixing my typing :-)
// read by: sel_ldr (passed in explicitly to command channel)
//
@@ -57,9 +57,13 @@ class PnaclCoordinator;
// for the file are opened.
class LocalTempFile {
public:
+ // Create a LocalTempFile with a random name.
+ LocalTempFile(Plugin* plugin,
+ pp::FileSystem* file_system);
+ // Create a LocalTempFile with a specific filename.
LocalTempFile(Plugin* plugin,
pp::FileSystem* file_system,
- PnaclCoordinator* coordinator);
+ const nacl::string& filename);
~LocalTempFile();
// Opens a writeable file IO object and descriptor referring to the file.
void OpenWrite(const pp::CompletionCallback& cb);
@@ -93,6 +97,8 @@ class LocalTempFile {
private:
NACL_DISALLOW_COPY_AND_ASSIGN(LocalTempFile);
+ void Initialize();
+
// Gets the POSIX file descriptor for a resource.
int32_t GetFD(int32_t pp_error,
const pp::Resource& resource,
@@ -106,7 +112,6 @@ class LocalTempFile {
Plugin* plugin_;
pp::FileSystem* file_system_;
- PnaclCoordinator* coordinator_;
const PPB_FileIOTrusted* file_io_trusted_;
pp::CompletionCallbackFactory<LocalTempFile> callback_factory_;
nacl::string filename_;
@@ -206,6 +211,7 @@ class PnaclCoordinator {
static PnaclCoordinator* BitcodeToNative(
Plugin* plugin,
const nacl::string& pexe_url,
+ const nacl::string& cache_identity,
const pp::CompletionCallback& translate_notify_callback);
// Call this to take ownership of the FD of the translated nexe after
@@ -234,6 +240,7 @@ class PnaclCoordinator {
// Therefore the constructor is private.
PnaclCoordinator(Plugin* plugin,
const nacl::string& pexe_url,
+ const nacl::string& cache_identity,
const pp::CompletionCallback& translate_notify_callback);
// Callback for when llc and ld have been downloaded.
@@ -323,6 +330,8 @@ class PnaclCoordinator {
// The URL for the pexe file.
nacl::string pexe_url_;
+ // Optional cache identity for translation caching.
+ nacl::string cache_identity_;
// Borrowed reference which must outlive the thread.
nacl::scoped_ptr<nacl::DescWrapper> pexe_wrapper_;
// Object file, produced by the translator and consumed by the linker.

Powered by Google App Engine
This is Rietveld 408576698