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

Unified Diff: content/browser/indexed_db/indexed_db_unittest.cc

Issue 2140193002: IndexedDB: Saving data loss status in IndexedDBPendingConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@idb-data-loss
Patch Set: Deleted commented out code. Created 4 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/indexed_db/indexed_db_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index b3736a50ce0fa3dc39cd37e4e92bdee9f0a9b764..88ceb265df21b922cb8d5af2be37dd8dc30e8fb4 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -193,20 +193,18 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
test_path = idb_context->GetFilePathForTesting(kTestOrigin);
- IndexedDBPendingConnection open_connection(open_callbacks,
- open_db_callbacks,
- 0 /* child_process_id */,
- 0 /* host_transaction_id */,
- 0 /* version */);
- factory->Open(base::ASCIIToUTF16("opendb"), open_connection,
+ std::unique_ptr<IndexedDBPendingConnection> open_connection(
+ new IndexedDBPendingConnection(
+ open_callbacks, open_db_callbacks, 0 /* child_process_id */,
+ 0 /* host_transaction_id */, 0 /* version */));
+ factory->Open(base::ASCIIToUTF16("opendb"), std::move(open_connection),
NULL /* request_context */, Origin(kTestOrigin),
idb_context->data_path());
- IndexedDBPendingConnection closed_connection(closed_callbacks,
- closed_db_callbacks,
- 0 /* child_process_id */,
- 0 /* host_transaction_id */,
- 0 /* version */);
- factory->Open(base::ASCIIToUTF16("closeddb"), closed_connection,
+ std::unique_ptr<IndexedDBPendingConnection> closed_connection(
+ new IndexedDBPendingConnection(
+ closed_callbacks, closed_db_callbacks, 0 /* child_process_id */,
+ 0 /* host_transaction_id */, 0 /* version */));
+ factory->Open(base::ASCIIToUTF16("closeddb"), std::move(closed_connection),
NULL /* request_context */, Origin(kTestOrigin),
idb_context->data_path());
@@ -274,10 +272,11 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnCommitFailure) {
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
const int64_t transaction_id = 1;
- IndexedDBPendingConnection connection(
- callbacks, db_callbacks, 0 /* child_process_id */, transaction_id,
- IndexedDBDatabaseMetadata::DEFAULT_VERSION);
- factory->Open(base::ASCIIToUTF16("db"), connection,
+ std::unique_ptr<IndexedDBPendingConnection> connection(
+ new IndexedDBPendingConnection(
+ callbacks, db_callbacks, 0 /* child_process_id */, transaction_id,
+ IndexedDBDatabaseMetadata::DEFAULT_VERSION));
+ factory->Open(base::ASCIIToUTF16("db"), std::move(connection),
NULL /* request_context */, Origin(kTestOrigin),
temp_dir.path());
« no previous file with comments | « content/browser/indexed_db/indexed_db_pending_connection.h ('k') | content/browser/indexed_db/mock_indexed_db_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698