OLD | NEW |
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 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 chained_blob_writer, | 2438 chained_blob_writer, |
2439 true, | 2439 true, |
2440 info.size)); | 2440 info.size)); |
2441 } else { | 2441 } else { |
2442 DCHECK(descriptor.url().is_valid()); | 2442 DCHECK(descriptor.url().is_valid()); |
2443 scoped_refptr<LocalWriteClosure> write_closure( | 2443 scoped_refptr<LocalWriteClosure> write_closure( |
2444 new LocalWriteClosure(chained_blob_writer, task_runner_.get())); | 2444 new LocalWriteClosure(chained_blob_writer, task_runner_.get())); |
2445 content::BrowserThread::PostTask( | 2445 content::BrowserThread::PostTask( |
2446 content::BrowserThread::IO, FROM_HERE, | 2446 content::BrowserThread::IO, FROM_HERE, |
2447 base::Bind(&LocalWriteClosure::WriteBlobToFileOnIOThread, | 2447 base::Bind(&LocalWriteClosure::WriteBlobToFileOnIOThread, |
2448 write_closure.get(), path, descriptor.url(), | 2448 write_closure, path, descriptor.url(), |
2449 descriptor.last_modified(), request_context_getter_)); | 2449 descriptor.last_modified(), request_context_getter_)); |
2450 } | 2450 } |
2451 return true; | 2451 return true; |
2452 } | 2452 } |
2453 | 2453 |
2454 void IndexedDBBackingStore::ReportBlobUnused(int64_t database_id, | 2454 void IndexedDBBackingStore::ReportBlobUnused(int64_t database_id, |
2455 int64_t blob_key) { | 2455 int64_t blob_key) { |
2456 DCHECK(KeyPrefix::IsValidDatabaseId(database_id)); | 2456 DCHECK(KeyPrefix::IsValidDatabaseId(database_id)); |
2457 bool all_blobs = blob_key == DatabaseMetaDataKey::kAllBlobsKey; | 2457 bool all_blobs = blob_key == DatabaseMetaDataKey::kAllBlobsKey; |
2458 DCHECK(all_blobs || DatabaseMetaDataKey::IsValidBlobKey(blob_key)); | 2458 DCHECK(all_blobs || DatabaseMetaDataKey::IsValidBlobKey(blob_key)); |
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4476 | 4476 |
4477 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( | 4477 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( |
4478 const WriteDescriptor& other) = default; | 4478 const WriteDescriptor& other) = default; |
4479 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = | 4479 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = |
4480 default; | 4480 default; |
4481 IndexedDBBackingStore::Transaction::WriteDescriptor& | 4481 IndexedDBBackingStore::Transaction::WriteDescriptor& |
4482 IndexedDBBackingStore::Transaction::WriteDescriptor:: | 4482 IndexedDBBackingStore::Transaction::WriteDescriptor:: |
4483 operator=(const WriteDescriptor& other) = default; | 4483 operator=(const WriteDescriptor& other) = default; |
4484 | 4484 |
4485 } // namespace content | 4485 } // namespace content |
OLD | NEW |