diff options
Diffstat (limited to 'chromium/content/browser/code_cache/generated_code_cache_context.h')
-rw-r--r-- | chromium/content/browser/code_cache/generated_code_cache_context.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/chromium/content/browser/code_cache/generated_code_cache_context.h b/chromium/content/browser/code_cache/generated_code_cache_context.h index 7e26e3269ee..b28d34b22f6 100644 --- a/chromium/content/browser/code_cache/generated_code_cache_context.h +++ b/chromium/content/browser/code_cache/generated_code_cache_context.h @@ -16,9 +16,9 @@ class GeneratedCodeCache; // One instance exists per disk-backed (non in-memory) storage contexts. This // owns the instance of GeneratedCodeCache that is used to store the data -// generated by the renderer (for ex: code caches for script resources). This -// initializes and closes the code cache on the I/O thread. The instance of -// this class (|this|) itself is constructed on the UI thread. +// generated by the renderer (for ex: code caches for script resources). +// The instance of this class (|this|) is constructed and lives on the +// UI thread. All methods must be called on UI thread. class CONTENT_EXPORT GeneratedCodeCacheContext : public base::RefCountedThreadSafe<GeneratedCodeCacheContext> { public: @@ -30,7 +30,8 @@ class CONTENT_EXPORT GeneratedCodeCacheContext // being setup. void Initialize(const base::FilePath& path, int max_bytes); - // Call on the IO thread to get the code cache instances. + void Shutdown(); + GeneratedCodeCache* generated_js_code_cache() const; GeneratedCodeCache* generated_wasm_code_cache() const; @@ -38,13 +39,9 @@ class CONTENT_EXPORT GeneratedCodeCacheContext friend class base::RefCountedThreadSafe<GeneratedCodeCacheContext>; ~GeneratedCodeCacheContext(); - void InitializeOnIO(const base::FilePath& path, int max_bytes); - - // Created, used and deleted on the IO thread. - std::unique_ptr<GeneratedCodeCache, BrowserThread::DeleteOnIOThread> - generated_js_code_cache_; - std::unique_ptr<GeneratedCodeCache, BrowserThread::DeleteOnIOThread> - generated_wasm_code_cache_; + // Created, used and deleted on the UI thread. + std::unique_ptr<GeneratedCodeCache> generated_js_code_cache_; + std::unique_ptr<GeneratedCodeCache> generated_wasm_code_cache_; DISALLOW_COPY_AND_ASSIGN(GeneratedCodeCacheContext); }; |