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

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

Issue 2727733004: [IndexedDB] Closing mojo connections when renderer quits (Closed)
Patch Set: comments, still figuring out how to test Created 3 years, 9 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 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3289 else 3289 else
3290 return ContinuePrevious(key, primary_key, next_state, s) == 3290 return ContinuePrevious(key, primary_key, next_state, s) ==
3291 ContinueResult::DONE; 3291 ContinueResult::DONE;
3292 } 3292 }
3293 3293
3294 IndexedDBBackingStore::Cursor::ContinueResult 3294 IndexedDBBackingStore::Cursor::ContinueResult
3295 IndexedDBBackingStore::Cursor::ContinueNext(const IndexedDBKey* key, 3295 IndexedDBBackingStore::Cursor::ContinueNext(const IndexedDBKey* key,
3296 const IndexedDBKey* primary_key, 3296 const IndexedDBKey* primary_key,
3297 IteratorState next_state, 3297 IteratorState next_state,
3298 Status* s) { 3298 Status* s) {
3299 IDB_TRACE("IndexedDBBackingStore::Cursor::ContinueNext");
Reilly Grant (use Gerrit) 2017/03/04 01:26:14 The changes in this file look unrelated.
dmurph 2017/03/09 20:44:15 Done.
3299 DCHECK(cursor_options_.forward); 3300 DCHECK(cursor_options_.forward);
3300 DCHECK(!key || key->IsValid()); 3301 DCHECK(!key || key->IsValid());
3301 DCHECK(!primary_key || primary_key->IsValid()); 3302 DCHECK(!primary_key || primary_key->IsValid());
3302 *s = Status::OK(); 3303 *s = Status::OK();
3303 3304
3304 // TODO(alecflett): avoid a copy here? 3305 // TODO(alecflett): avoid a copy here?
3305 IndexedDBKey previous_key = current_key_ ? *current_key_ : IndexedDBKey(); 3306 IndexedDBKey previous_key = current_key_ ? *current_key_ : IndexedDBKey();
3306 3307
3307 // If seeking to a particular key (or key and primary key), skip the cursor 3308 // If seeking to a particular key (or key and primary key), skip the cursor
3308 // forward rather than iterating it. 3309 // forward rather than iterating it.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 } 3358 }
3358 3359
3359 return ContinueResult::DONE; 3360 return ContinueResult::DONE;
3360 } 3361 }
3361 3362
3362 IndexedDBBackingStore::Cursor::ContinueResult 3363 IndexedDBBackingStore::Cursor::ContinueResult
3363 IndexedDBBackingStore::Cursor::ContinuePrevious(const IndexedDBKey* key, 3364 IndexedDBBackingStore::Cursor::ContinuePrevious(const IndexedDBKey* key,
3364 const IndexedDBKey* primary_key, 3365 const IndexedDBKey* primary_key,
3365 IteratorState next_state, 3366 IteratorState next_state,
3366 Status* s) { 3367 Status* s) {
3368 IDB_TRACE("IndexedDBBackingStore::Cursor::ContinuePrevious");
3367 DCHECK(!cursor_options_.forward); 3369 DCHECK(!cursor_options_.forward);
3368 DCHECK(!key || key->IsValid()); 3370 DCHECK(!key || key->IsValid());
3369 DCHECK(!primary_key || primary_key->IsValid()); 3371 DCHECK(!primary_key || primary_key->IsValid());
3370 *s = Status::OK(); 3372 *s = Status::OK();
3371 3373
3372 // TODO(alecflett): avoid a copy here? 3374 // TODO(alecflett): avoid a copy here?
3373 IndexedDBKey previous_key = current_key_ ? *current_key_ : IndexedDBKey(); 3375 IndexedDBKey previous_key = current_key_ ? *current_key_ : IndexedDBKey();
3374 3376
3375 // When iterating with PrevNoDuplicate, spec requires that the value we 3377 // When iterating with PrevNoDuplicate, spec requires that the value we
3376 // yield for each key is the *first* duplicate in forwards order. We do this 3378 // yield for each key is the *first* duplicate in forwards order. We do this
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 4477
4476 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( 4478 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor(
4477 const WriteDescriptor& other) = default; 4479 const WriteDescriptor& other) = default;
4478 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = 4480 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() =
4479 default; 4481 default;
4480 IndexedDBBackingStore::Transaction::WriteDescriptor& 4482 IndexedDBBackingStore::Transaction::WriteDescriptor&
4481 IndexedDBBackingStore::Transaction::WriteDescriptor:: 4483 IndexedDBBackingStore::Transaction::WriteDescriptor::
4482 operator=(const WriteDescriptor& other) = default; 4484 operator=(const WriteDescriptor& other) = default;
4483 4485
4484 } // namespace content 4486 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698