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

Side by Side Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 1504033007: Move Indexed DB from dedicated thread to task scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timer
Patch Set: Tweak traits Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 this->last_modified_ = last_modified; 2592 this->last_modified_ = last_modified;
2593 2593
2594 delegate->Start(std::move(blob_request), 2594 delegate->Start(std::move(blob_request),
2595 base::Bind(&LocalWriteClosure::Run, this)); 2595 base::Bind(&LocalWriteClosure::Run, this));
2596 chained_blob_writer_->set_delegate(std::move(delegate)); 2596 chained_blob_writer_->set_delegate(std::move(delegate));
2597 } 2597 }
2598 2598
2599 private: 2599 private:
2600 virtual ~LocalWriteClosure() { 2600 virtual ~LocalWriteClosure() {
2601 // Make sure the last reference to a ChainedBlobWriter is released (and 2601 // Make sure the last reference to a ChainedBlobWriter is released (and
2602 // deleted) on the IDB thread since it owns a transaction which has thread 2602 // deleted) on the IDB sequence since it owns a transaction which has
2603 // affinity. 2603 // sequence affinity.
2604 IndexedDBBackingStore::Transaction::ChainedBlobWriter* raw_tmp = 2604 IndexedDBBackingStore::Transaction::ChainedBlobWriter* raw_tmp =
2605 chained_blob_writer_.get(); 2605 chained_blob_writer_.get();
2606 raw_tmp->AddRef(); 2606 raw_tmp->AddRef();
2607 chained_blob_writer_ = NULL; 2607 chained_blob_writer_ = NULL;
2608 task_runner_->ReleaseSoon(FROM_HERE, raw_tmp); 2608 task_runner_->ReleaseSoon(FROM_HERE, raw_tmp);
2609 } 2609 }
2610 friend class base::RefCountedThreadSafe<LocalWriteClosure>; 2610 friend class base::RefCountedThreadSafe<LocalWriteClosure>;
2611 2611
2612 // If necessary, update the timestamps on the file as a final 2612 // If necessary, update the timestamps on the file as a final
2613 // step before reporting success. 2613 // step before reporting success.
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
4492 4492
4493 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( 4493 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor(
4494 const WriteDescriptor& other) = default; 4494 const WriteDescriptor& other) = default;
4495 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = 4495 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() =
4496 default; 4496 default;
4497 IndexedDBBackingStore::Transaction::WriteDescriptor& 4497 IndexedDBBackingStore::Transaction::WriteDescriptor&
4498 IndexedDBBackingStore::Transaction::WriteDescriptor:: 4498 IndexedDBBackingStore::Transaction::WriteDescriptor::
4499 operator=(const WriteDescriptor& other) = default; 4499 operator=(const WriteDescriptor& other) = default;
4500 4500
4501 } // namespace content 4501 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/database_impl.cc ('k') | content/browser/indexed_db/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698