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

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

Issue 19705017: Create a new FileSystemOperationRunner for each FileAPIMessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 312e04dd4fd479c19c911cdf6cfa195e574d5308..1fbb338504db6b79fd42f178b761f160f839f78a 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -90,6 +90,7 @@ FileAPIMessageFilter::FileAPIMessageFilter(
}
void FileAPIMessageFilter::OnChannelConnected(int32 peer_pid) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserMessageFilter::OnChannelConnected(peer_pid);
if (request_context_getter_.get()) {
@@ -98,9 +99,12 @@ void FileAPIMessageFilter::OnChannelConnected(int32 peer_pid) {
request_context_getter_ = NULL;
DCHECK(request_context_);
}
+
+ operation_runner_ = context_->CreateFileSystemOperationRunner();
}
void FileAPIMessageFilter::OnChannelClosing() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserMessageFilter::OnChannelClosing();
// Unregister all the blob URLs that are previously registered in this
@@ -128,7 +132,7 @@ void FileAPIMessageFilter::OnChannelClosing() {
}
on_close_callbacks_.Clear();
- operation_runner()->Shutdown();
+ operation_runner_.reset();
operations_.clear();
}
@@ -738,8 +742,4 @@ bool FileAPIMessageFilter::HasPermissionsForFile(
permissions, error);
}
-fileapi::FileSystemOperationRunner* FileAPIMessageFilter::operation_runner() {
- return context_->operation_runner();
-}
-
} // namespace content
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/browser/fileapi/fileapi_message_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698