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

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

Issue 17653005: Merge StreamContext into ChromeBlobStorageContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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: 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 728b0d58e253237ca8087087d7c24618c3be17f9..5f5b83e008c4f3b3104ae6bfc0c566b0a88b7022 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.cc
+++ b/content/browser/fileapi/chrome_blob_storage_context.cc
@@ -5,6 +5,7 @@
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "base/bind.h"
+#include "content/browser/streams/stream_registry.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "webkit/browser/blob/blob_storage_controller.h"
@@ -41,11 +42,16 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
void ChromeBlobStorageContext::InitializeOnIOThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
controller_.reset(new BlobStorageController());
+ stream_registry_.reset(new StreamRegistry());
}
ChromeBlobStorageContext::~ChromeBlobStorageContext() {}
void ChromeBlobStorageContext::DeleteOnCorrectThread() const {
+ // In many tests, there isn't a valid IO thread. In that case, just delete on
+ // the current thread.
+ // TODO(tyoshino): Remove this custom deleter, and fix the leaks in all the
+ // tests.
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) &&
!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
« no previous file with comments | « content/browser/fileapi/chrome_blob_storage_context.h ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698