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

Side by Side Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 163433015: Add sandbox ISA and extra compile flag fields to PNaCl translation cache key (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry upload again Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/nacl/common/pnacl_types.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/renderer/ppb_nacl_private_impl.h" 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
6 6
7 #ifndef DISABLE_NACL 7 #ifndef DISABLE_NACL
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return num_processors; 266 return num_processors;
267 } 267 }
268 268
269 int32_t GetNexeFd(PP_Instance instance, 269 int32_t GetNexeFd(PP_Instance instance,
270 const char* pexe_url, 270 const char* pexe_url,
271 uint32_t abi_version, 271 uint32_t abi_version,
272 uint32_t opt_level, 272 uint32_t opt_level,
273 const char* last_modified, 273 const char* last_modified,
274 const char* etag, 274 const char* etag,
275 PP_Bool has_no_store_header, 275 PP_Bool has_no_store_header,
276 const char* sandbox_isa,
277 const char* extra_flags,
276 PP_Bool* is_hit, 278 PP_Bool* is_hit,
277 PP_FileHandle* handle, 279 PP_FileHandle* handle,
278 struct PP_CompletionCallback callback) { 280 struct PP_CompletionCallback callback) {
279 ppapi::thunk::EnterInstance enter(instance, callback); 281 ppapi::thunk::EnterInstance enter(instance, callback);
280 if (enter.failed()) 282 if (enter.failed())
281 return enter.retval(); 283 return enter.retval();
282 if (!pexe_url || !last_modified || !etag || !is_hit || !handle) 284 if (!pexe_url || !last_modified || !etag || !is_hit || !handle)
283 return enter.SetResult(PP_ERROR_BADARGUMENT); 285 return enter.SetResult(PP_ERROR_BADARGUMENT);
284 if (!InitializePnaclResourceHost()) 286 if (!InitializePnaclResourceHost())
285 return enter.SetResult(PP_ERROR_FAILED); 287 return enter.SetResult(PP_ERROR_FAILED);
286 288
287 base::Time last_modified_time; 289 base::Time last_modified_time;
288 // If FromString fails, it doesn't touch last_modified_time and we just send 290 // If FromString fails, it doesn't touch last_modified_time and we just send
289 // the default-constructed null value. 291 // the default-constructed null value.
290 base::Time::FromString(last_modified, &last_modified_time); 292 base::Time::FromString(last_modified, &last_modified_time);
291 293
292 nacl::PnaclCacheInfo cache_info; 294 nacl::PnaclCacheInfo cache_info;
293 cache_info.pexe_url = GURL(pexe_url); 295 cache_info.pexe_url = GURL(pexe_url);
294 cache_info.abi_version = abi_version; 296 cache_info.abi_version = abi_version;
295 cache_info.opt_level = opt_level; 297 cache_info.opt_level = opt_level;
296 cache_info.last_modified = last_modified_time; 298 cache_info.last_modified = last_modified_time;
297 cache_info.etag = std::string(etag); 299 cache_info.etag = std::string(etag);
298 cache_info.has_no_store_header = PP_ToBool(has_no_store_header); 300 cache_info.has_no_store_header = PP_ToBool(has_no_store_header);
301 cache_info.sandbox_isa = std::string(sandbox_isa);
302 cache_info.extra_flags = std::string(extra_flags);
299 303
300 g_pnacl_resource_host.Get()->RequestNexeFd( 304 g_pnacl_resource_host.Get()->RequestNexeFd(
301 GetRoutingID(instance), 305 GetRoutingID(instance),
302 instance, 306 instance,
303 cache_info, 307 cache_info,
304 is_hit, 308 is_hit,
305 handle, 309 handle,
306 enter.callback()); 310 enter.callback());
307 311
308 return enter.SetResult(PP_OK_COMPLETIONPENDING); 312 return enter.SetResult(PP_OK_COMPLETIONPENDING);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 492
489 namespace nacl { 493 namespace nacl {
490 494
491 const PPB_NaCl_Private* GetNaClPrivateInterface() { 495 const PPB_NaCl_Private* GetNaClPrivateInterface() {
492 return &nacl_interface; 496 return &nacl_interface;
493 } 497 }
494 498
495 } // namespace nacl 499 } // namespace nacl
496 500
497 #endif // DISABLE_NACL 501 #endif // DISABLE_NACL
OLDNEW
« no previous file with comments | « components/nacl/common/pnacl_types.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698