DescriptionRFC: Add an interface for having the browser open a pnacl support file (readonly) from the installed pnacl component directory.
int (*GetReadonlyPnaclFd)(const char* filename);
Trajectory: Currently for pnacl dogfooding we use a chrome extension to store pnacl files and do a URL request to read them. This is nice because:
- we don't need any new interface to get to those files.
- the chrome installer isn't bloated.
However, we eventually want to use component updater instead of an extension, but that would require this new interface (or something like it). All this is to decouple our install/updates from the chrome install because the pnacl files are currently large.
Why move to component updater:
- Component updater allows us to send more user-machine information to Omaha to pick the right .nexe architecture for the pnacl tools rather than download one large extension with all architectures. This focuses the install/updates to 1/3 the files that were in the large extension (x86-32, x86-64, arm).
- This is especially useful for Windows where there is a single version of chrome, so for things like the NaCl IRT we include both x86-32 and 64, just in case. With the right info sent to Omaha, PNaCl can pick exactly the required x86-32 vs 64 components rather than just including both blindly.
- Similar to the above, we can test for the chrome revision and send out different packages to canary / beta / stable channels if needed.
- Installs can be profile-independent -- no separate copies per profile. It is installed in the profile directory like PepperFlash, but it is profile/Pnacl not profile/User1/Pnacl and profile/User2/Pnacl.
- Install via component updater will eventually require less user intervention (no going to the webstore). For now, this isn't quite true because the use of pnacl+component updater is still hidden behind a flag because of size issues. Alternatively, there are "component extensions", which have a similar transparent install?
- URL requests in the NaCl plugin currently use stream-as-file, which makes copies of files into the temp directory. This avoids that copy. (30 - 200ms in a release build on Linux to do a URL load + copy, vs 0.4ms to just get the FD).
- See component updater design doc for more: https://docs.google.com/a/google.com/document/d/1gqKdDaoH9s8pbQkb9I_EX8Cfdsjg1QFEIZxtbH0Mqs4/edit?hl=en_US
Even without component updater, if we choose to bundle PNaCl with Chrome in ways other than an extension and use URL requests, we will need a similar interface.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2365
TEST= to be written...
Patch Set 1 #Patch Set 2 : // Do we want this to take a completion callback and be async, or #Patch Set 3 : stuff. #Patch Set 4 : tweak error cases, try off thread. #Patch Set 5 : rebase, update for pnacl layout change #
Total comments: 1
Patch Set 6 : add a test, do some tweaks. #
Total comments: 1
Messages
Total messages: 15 (0 generated)
|