| Index: trunk/src/chrome/browser/nacl_host/pnacl_translation_cache.h
|
| ===================================================================
|
| --- trunk/src/chrome/browser/nacl_host/pnacl_translation_cache.h (revision 204381)
|
| +++ trunk/src/chrome/browser/nacl_host/pnacl_translation_cache.h (working copy)
|
| @@ -22,7 +22,7 @@
|
|
|
| namespace pnacl_cache {
|
| typedef base::Callback<void(int)> CompletionCallback;
|
| -class PNaClTranslationCacheEntry;
|
| +class PNaClTranslationCacheWriteEntry;
|
| extern const int kMaxMemCacheSize;
|
|
|
| class PNaClTranslationCache
|
| @@ -48,20 +48,19 @@
|
| const std::string& nexe,
|
| const CompletionCallback& callback);
|
|
|
| - // Retrieve the nexe from the translation cache. Write the data into |nexe|
|
| - // and call |callback| with the result (0 on success and <0 otherwise)
|
| - void GetNexe(const std::string& key,
|
| - std::string* nexe,
|
| - const CompletionCallback& callback);
|
| + // Retrieve the nexe from the translation cache. (Not implemented yet.)
|
| + int GetNexe(const std::string& key,
|
| + std::string* nexe,
|
| + const CompletionCallback& callback);
|
|
|
| // Return the number of entries in the cache backend.
|
| int Size();
|
|
|
| private:
|
| - friend class PNaClTranslationCacheEntry;
|
| - // PNaClTranslationCacheEntry should only use the
|
| - // OpComplete and backend methods on PNaClTranslationCache.
|
| - void OpComplete(PNaClTranslationCacheEntry* entry);
|
| + friend class PNaClTranslationCacheWriteEntry;
|
| + // PNaClTranslationCacheWriteEntry should only use the
|
| + // WriteComplete and backend methods on PNaClTranslationCache.
|
| + void WriteComplete(PNaClTranslationCacheWriteEntry* entry);
|
| disk_cache::Backend* backend() { return disk_cache_; }
|
|
|
| int InitWithDiskBackend(const base::FilePath& disk_cache_dir,
|
| @@ -80,7 +79,8 @@
|
| disk_cache::Backend* disk_cache_;
|
| CompletionCallback init_callback_;
|
| bool in_memory_;
|
| - std::map<void*, scoped_refptr<PNaClTranslationCacheEntry> > open_entries_;
|
| + std::map<void*, scoped_refptr<PNaClTranslationCacheWriteEntry> >
|
| + write_entries_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PNaClTranslationCache);
|
| };
|
|
|