Chromium Code Reviews| Index: content/browser/dom_storage/dom_storage_context_wrapper.cc |
| diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc |
| index be4ffb4c0b619f129745bb2b14a1d742ccb5f950..05541ae950535bf55fc1f9b421db287a0e20165d 100644 |
| --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc |
| +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc |
| @@ -248,13 +248,22 @@ void DOMStorageContextWrapper::Shutdown() { |
| } |
| -void DOMStorageContextWrapper::Flush() { |
| +std::vector<scoped_refptr<base::SequencedTaskRunner>> |
| +DOMStorageContextWrapper::Flush() { |
| DCHECK(context_.get()); |
| + std::vector<scoped_refptr<base::SequencedTaskRunner>> flush_runners; |
| + if (mojo_state_) { |
| + mojo_state_->Flush(); |
| + // TODO(michaeln): Add mojo impl task runners to flush_runners |
|
Marijn Kruisselbrink
2017/04/12 21:55:58
I'm a bit confused about the implied semantics of
|
| + } |
| context_->task_runner()->PostShutdownBlockingTask( |
| FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| base::Bind(&DOMStorageContextImpl::Flush, context_)); |
| - if (mojo_state_) |
| - mojo_state_->Flush(); |
| + flush_runners.push_back(context_->task_runner()->GetSequencedTaskRunner( |
| + DOMStorageTaskRunner::PRIMARY_SEQUENCE)); |
| + flush_runners.push_back(context_->task_runner()->GetSequencedTaskRunner( |
| + DOMStorageTaskRunner::COMMIT_SEQUENCE)); |
| + return flush_runners; |
| } |
| void DOMStorageContextWrapper::OpenLocalStorage( |