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

Unified Diff: components/nacl/browser/pnacl_translation_cache.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: 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/browser/pnacl_translation_cache.cc
diff --git a/components/nacl/browser/pnacl_translation_cache.cc b/components/nacl/browser/pnacl_translation_cache.cc
index e27103adf8d5f2fc9f81763d4866931f8f4b8ab0..093faf19affcaa4c79e6c97589e0ff971b7c27dc 100644
--- a/components/nacl/browser/pnacl_translation_cache.cc
+++ b/components/nacl/browser/pnacl_translation_cache.cc
@@ -398,6 +398,9 @@ int PnaclTranslationCache::Size() {
return disk_cache_->GetEntryCount();
}
+// Beware that any changes to this function or to PnaclCacheInfo will
+// effectively invalidate existing translation cache entries.
+
// static
std::string PnaclTranslationCache::GetKey(const nacl::PnaclCacheInfo& info) {
if (!info.pexe_url.is_valid() || info.abi_version < 0 || info.opt_level < 0)
@@ -426,7 +429,9 @@ std::string PnaclTranslationCache::GetKey(const nacl::PnaclCacheInfo& info) {
IntToString(exploded.hour) + ":" + IntToString(exploded.minute) +
":" + IntToString(exploded.second) + ":" +
IntToString(exploded.millisecond) + ":UTC;";
- retval += "etag:" + info.etag;
+ retval += "etag:" + info.etag + ";";
+ retval += "sandbox:" + info.sandbox_isa + ";";
+ retval += "extra_flags:" + info.extra_flags + ";";
return retval;
}

Powered by Google App Engine
This is Rietveld 408576698