diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-22 23:09:52 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-22 23:09:52 +0000 |
commit | d21e4a40ecf63968b03a32b4da6725eb2be7b9f1 (patch) | |
tree | f1761eba3783fe4fd1beacd2227dc86e7e063abe /ppapi/c/private | |
parent | bdb0e21c3e8eae56068895c859d887a9a3542468 (diff) | |
download | chromium_src-d21e4a40ecf63968b03a32b4da6725eb2be7b9f1.zip chromium_src-d21e4a40ecf63968b03a32b4da6725eb2be7b9f1.tar.gz chromium_src-d21e4a40ecf63968b03a32b4da6725eb2be7b9f1.tar.bz2 |
Revert 284684 "Pepper: Delete FileDownloader in trusted plugin."
Reverting as broke chrome and chromeos dbg builders:
http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29/builds/32615/steps/browser_tests/logs/SuccessfulLoadUMA
[ RUN ] NaClBrowserTestPnacl.SuccessfulLoadUMA
Xlib: extension "RANDR" missing on display ":9".
Xlib: extension "RANDR" missing on display ":9".
[18889:18889:0722/130648:WARNING:password_store_factory.cc(215)] Using
basic (unencrypted) store for password storage. See
http://code.google.com/p/chromium/wiki/LinuxPasswordStorage for more
information about password storage options.
HTTP server started on http://127.0.0.1:56115...
sending server_data: {"host": "127.0.0.1", "port": 56115} (36 bytes)
[9:10:0722/130650:ERROR:pnacl_translation_resource_host.cc(135)] Got
invalid platformfilefortransit
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/debug/vector:461:
error: attempt to insert into container with an iterator from a
different container.
Objects involved in the operation:
sequence "this" @ 0x0x392ba6c93260 {
}
iterator "__position" @ 0x0x7fff9ff24e20 {
state = past-the-end;
references sequence @ 0x0x7fff9ff24e20
}
[18889:18938:0722/130651:WARNING:raw_channel_posix.cc(214)] recvmsg:
Connection reset by peer
BrowserTestBase signal handler received SIGTERM. Backtrace:
#0 0x7fe4bf491cee base::debug::StackTrace::StackTrace()
#1 0x000004af93fa content::(anonymous
namespace)::DumpStackTraceSignalHandler()
#2 0x7fe4b68074a0 \u003Cunknown>
#3 0x7fe4b68b9a43 __poll
#4 0x7fe4b76faff6 \u003Cunknown>
#5 0x7fe4b76fb124 g_main_context_iteration
#6 0x7fe4bf44ff75 base::MessagePumpGlib::Run()
#7 0x7fe4bf54b1f0 base::MessageLoop::RunHandler()
#8 0x7fe4bf5b18e2 base::RunLoop::Run()
#9 0x000004b63969 content::RunThisRunLoop()
#10 0x000004b638fa content::RunMessageLoop()
#11 0x000004b0ea15 content::JavascriptTestObserver::Run()
#12 0x000001312927 NaClBrowserTestBase::RunJavascriptTest()
#13 0x000001312a48 NaClBrowserTestBase::RunLoadTest()
#14 0x00000130f514 (anonymous
namespace)::NaClBrowserTestPnacl_SuccessfulLoadUMA_Test::RunTestOnMai
...
> Pepper: Delete FileDownloader in trusted plugin.
>
> This simplifies PnaclCoordinator considerably and reduces the total
> amount of code in the trusted plugin.
>
> BUG=239656
>
> Review URL: https://codereview.chromium.org/393693004
TBR=teravest@chromium.org
Review URL: https://codereview.chromium.org/406323003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/private')
-rw-r--r-- | ppapi/c/private/ppb_nacl_private.h | 37 | ||||
-rw-r--r-- | ppapi/c/private/ppp_pexe_stream_handler.h | 59 |
2 files changed, 22 insertions, 74 deletions
diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h index 940979f..29ef59c 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 Thu Jul 10 10:34:30 2014. */ +/* From private/ppb_nacl_private.idl modified Wed Jul 9 11:09:04 2014. */ #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ @@ -14,7 +14,6 @@ #include "ppapi/c/pp_macros.h" #include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_var.h" -#include "ppapi/c/private/ppp_pexe_stream_handler.h" #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 @@ -271,6 +270,27 @@ struct PPB_NaCl_Private_1_0 { int32_t (*GetNumberOfProcessors)(void); /* Return whether the non-SFI mode is enabled. */ PP_Bool (*IsNonSFIModeEnabled)(void); + /* 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 information given by |pexe_url|, + * |abi_version|, |opt_level|, and |headers|. 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. Currently the implementation is + * a stub, which always sets is_hit to false and calls the implementation of + * CreateTemporaryFile. In a subsequent CL it will call into the browser + * which will remember the association between the cache key and the fd, and + * copy the nexe into the cache after the translation finishes. + */ + int32_t (*GetNexeFd)(PP_Instance instance, + const char* pexe_url, + uint32_t abi_version, + uint32_t opt_level, + const char* headers, + const char* extra_flags, + PP_Bool* is_hit, + PP_FileHandle* nexe_handle, + struct PP_CompletionCallback callback); /* Report to the browser that translation of the pexe for |instance| * has finished, or aborted with an error. If |success| is true, the * browser may then store the translation in the cache. The renderer @@ -396,19 +416,6 @@ struct PPB_NaCl_Private_1_0 { * time. */ void (*SetPNaClStartTime)(PP_Instance instance); - /* Downloads and streams a pexe file for PNaCl translation. - * Fetches the content at |pexe_url| for the given instance and opt_level. - * If a translated cached nexe is already available, |cache_hit_handle| - * is set and |cache_hit_callback| is called. - * Otherwise, |stream_callback| is called repeatedly with blocks of data - * as they are received. |stream_finished_callback| is called after all - * data has been received and dispatched to |stream_callback|. - */ - void (*StreamPexe)(PP_Instance instance, - const char* pexe_url, - int32_t opt_level, - const struct PPP_PexeStreamHandler_1_0* stream_handler, - void* stream_handler_user_data); }; typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; diff --git a/ppapi/c/private/ppp_pexe_stream_handler.h b/ppapi/c/private/ppp_pexe_stream_handler.h deleted file mode 100644 index abb2cb0..0000000 --- a/ppapi/c/private/ppp_pexe_stream_handler.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright 2014 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From private/ppp_pexe_stream_handler.idl, - * modified Thu Jul 10 11:05:31 2014. - */ - -#ifndef PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_ -#define PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_ - -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" - -#define PPP_PEXESTREAMHANDLER_INTERFACE_1_0 "PPP_PexeStreamHandler;1.0" -#define PPP_PEXESTREAMHANDLER_INTERFACE PPP_PEXESTREAMHANDLER_INTERFACE_1_0 - -/** - * @file - * This file contains NaCl private interfaces. This interface is not versioned - * and is for internal Chrome use. It may change without notice. */ - - -#include "ppapi/c/private/pp_file_handle.h" - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPP_PexeStreamHandler_1_0 { - /** - * Invoked as a result of a cache hit for a translated pexe. - */ - void (*DidCacheHit)(void* user_data, PP_FileHandle nexe_file_handle); - /** - * Invoked as a result of a cache miss for a translated pexe. - * Provides the expected length of the pexe, as read from HTTP headers. - */ - void (*DidCacheMiss)(void* user_data, int64_t expected_total_length); - /** - * Invoked when a block of data has been downloaded. - * Only invoked after DidCacheMiss(). - */ - void (*DidStreamData)(void* user_data, const void* data, int32_t length); - /** - * Invoked when the stream has finished downloading, regardless of whether it - * succeeded. Not invoked if DidCacheHit() was called. - */ - void (*DidFinishStream)(void* user_data, int32_t pp_error); -}; - -typedef struct PPP_PexeStreamHandler_1_0 PPP_PexeStreamHandler; -/** - * @} - */ - -#endif /* PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_ */ - |