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

Unified Diff: content/browser/fileapi/chrome_blob_storage_context.cc

Issue 1528233004: [Blob] Blob paging to disk patch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blob-disk1
Patch Set: Created 5 years 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
« no previous file with comments | « content/browser/fileapi/chrome_blob_storage_context.h ('k') | content/common/fileapi/webblob_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/chrome_blob_storage_context.cc
diff --git a/content/browser/fileapi/chrome_blob_storage_context.cc b/content/browser/fileapi/chrome_blob_storage_context.cc
index 5e2c4c83d1defc227d18f01ec8ac48456abdf40f..87492a42b7f98b9c54086e8324bf74516e5cd39e 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.cc
+++ b/content/browser/fileapi/chrome_blob_storage_context.cc
@@ -37,13 +37,14 @@ class BlobHandleImpl : public BlobHandle {
} // namespace
-ChromeBlobStorageContext::ChromeBlobStorageContext() {}
+ChromeBlobStorageContext::ChromeBlobStorageContext(bool disk_enabled)
+ : disk_enabled_(disk_enabled) {}
ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
BrowserContext* context) {
if (!context->GetUserData(kBlobStorageContextKeyName)) {
scoped_refptr<ChromeBlobStorageContext> blob =
- new ChromeBlobStorageContext();
+ new ChromeBlobStorageContext(!context->IsOffTheRecord());
context->SetUserData(
kBlobStorageContextKeyName,
new UserDataAdapter<ChromeBlobStorageContext>(blob.get()));
@@ -61,7 +62,7 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
void ChromeBlobStorageContext::InitializeOnIOThread() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- context_.reset(new BlobStorageContext());
+ context_.reset(new BlobStorageContext(disk_enabled_));
}
scoped_ptr<BlobHandle> ChromeBlobStorageContext::CreateMemoryBackedBlob(
« no previous file with comments | « content/browser/fileapi/chrome_blob_storage_context.h ('k') | content/common/fileapi/webblob_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698