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

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

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_database.h" 5 #include "content/browser/indexed_db/indexed_db_database.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
9 #include <set> 8 #include <set>
9 #include <utility>
10 10
11 #include "base/auto_reset.h" 11 #include "base/auto_reset.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "content/browser/indexed_db/indexed_db.h" 17 #include "content/browser/indexed_db/indexed_db.h"
18 #include "content/browser/indexed_db/indexed_db_backing_store.h" 18 #include "content/browser/indexed_db/indexed_db_backing_store.h"
19 #include "content/browser/indexed_db/indexed_db_callbacks.h" 19 #include "content/browser/indexed_db/indexed_db_callbacks.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); 389 EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
390 390
391 391
392 // Put is asynchronous 392 // Put is asynchronous
393 IndexedDBValue value("value1", std::vector<IndexedDBBlobInfo>()); 393 IndexedDBValue value("value1", std::vector<IndexedDBBlobInfo>());
394 ScopedVector<storage::BlobDataHandle> handles; 394 ScopedVector<storage::BlobDataHandle> handles;
395 scoped_ptr<IndexedDBKey> key(new IndexedDBKey("key")); 395 scoped_ptr<IndexedDBKey> key(new IndexedDBKey("key"));
396 std::vector<IndexedDBDatabase::IndexKeys> index_keys; 396 std::vector<IndexedDBDatabase::IndexKeys> index_keys;
397 scoped_refptr<MockIndexedDBCallbacks> request( 397 scoped_refptr<MockIndexedDBCallbacks> request(
398 new MockIndexedDBCallbacks(false)); 398 new MockIndexedDBCallbacks(false));
399 db_->Put(transaction_->id(), 399 db_->Put(transaction_->id(), store_id, &value, &handles, std::move(key),
400 store_id, 400 blink::WebIDBPutModeAddOnly, request, index_keys);
401 &value,
402 &handles,
403 key.Pass(),
404 blink::WebIDBPutModeAddOnly,
405 request,
406 index_keys);
407 401
408 // Deletion is asynchronous. 402 // Deletion is asynchronous.
409 db_->DeleteObjectStore(transaction_->id(), 403 db_->DeleteObjectStore(transaction_->id(),
410 store_id); 404 store_id);
411 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); 405 EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
412 406
413 // This will execute the Put then Delete. 407 // This will execute the Put then Delete.
414 RunPostedTasks(); 408 RunPostedTasks();
415 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); 409 EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
416 410
417 transaction_->Commit(); // Cleans up the object hierarchy. 411 transaction_->Commit(); // Cleans up the object hierarchy.
418 } 412 }
419 413
420 } // namespace content 414 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698