diff options
author | dschuff@chromium.org <dschuff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 21:08:21 +0000 |
---|---|---|
committer | dschuff@chromium.org <dschuff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 21:08:21 +0000 |
commit | 3e74ca463ead93ccd33c843382dcf4e083d7432b (patch) | |
tree | 87fe21946a23232fa53c2bdaa7bec5b5a8d4f73d /ppapi/c | |
parent | bd9b7b95187249f588acc4f5a61cf37c5b686817 (diff) | |
download | chromium_src-3e74ca463ead93ccd33c843382dcf4e083d7432b.zip chromium_src-3e74ca463ead93ccd33c843382dcf4e083d7432b.tar.gz chromium_src-3e74ca463ead93ccd33c843382dcf4e083d7432b.tar.bz2 |
Renderer and IPC implementation for new PNaCl translation cache
Creates new IPCs which the renderer/plugin will use to request a temp file descriptor for the translated nexe. In the future the browser will check the cache and may return the cached translation. In this CL, the browser simply creates a new temp file via the existing mechanism and sends it back with an indication that the cache missed. Also creates another IPC to notify the browser that the translation has finished. In a future CL it will cause the browser to try to cache the translation. Details on the design can be found in http://goo.gl/8mgYS
In addition to the IPCs, this CL creates PnaclTranslationResourceHost in the renderer to track the outstanding translation cache requests and fills out the implementation of the NaCl private pepper interfaces which correspond to the IPCs. It also refactors nacl_file_host::CreateTemporaryFile so that it can more easily be used to implement both the existing CreateTemporaryFile IPC (which is still used for the object file) and the new NexeTempFileRequest IPC (which is used for the final linked nexe).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3372
TEST= browser_tests --gtest_filter=NaClBrowserTestPnaclWithNewCache.*:NaClBrowserTestPnacl.*
R=binji@chromium.org, dmichael@chromium.org, jschuh@chromium.org, jvoung@chromium.org, thakis@chromium.org, yzshen@chromium.org
Review URL: https://codereview.chromium.org/17839005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/private/ppb_nacl_private.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h index 2b6c215..5ebfa7c 100644 --- a/ppapi/c/private/ppb_nacl_private.h +++ b/ppapi/c/private/ppb_nacl_private.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From private/ppb_nacl_private.idl modified Tue Jun 25 15:57:09 2013. */ +/* From private/ppb_nacl_private.idl modified Wed Jul 3 17:49:33 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ @@ -128,7 +128,8 @@ struct PPB_NaCl_Private_1_0 { PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); /* Create a temporary file, which will be deleted by the time the last * handle is closed (or earlier on POSIX systems), to use for the nexe - * with the cache key given by |cache_key|. If the nexe is already present + * with the cache information given by |pexe_url|, |abi_version|, |opt_level|, + * |last_modified|, and |etag|. If the nexe is already present * in the cache, |is_hit| is set to PP_TRUE and the contents of the nexe * will be copied into the temporary file. Otherwise |is_hit| is set to * PP_FALSE and the temporary file will be writeable. @@ -139,7 +140,11 @@ struct PPB_NaCl_Private_1_0 { * translation finishes. */ int32_t (*GetNexeFd)(PP_Instance instance, - const char* cache_key, + const char* pexe_url, + uint32_t abi_version, + uint32_t opt_level, + const char* last_modified, + const char* etag, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback callback); |