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

Unified Diff: content/browser/cache_storage/cache_storage_manager_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 5 years 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/cache_storage/cache_storage_manager_unittest.cc
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
index 89b9db4afed7433ed54a8c30f349731ba2970c98..f8d94976e2bc33004aac54696cfaae87cea18f17 100644
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -135,8 +136,8 @@ class CacheStorageManagerTest : public testing::Test {
scoped_ptr<ServiceWorkerResponse> response,
scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
callback_error_ = error;
- callback_cache_response_ = response.Pass();
- callback_data_handle_ = blob_data_handle.Pass();
+ callback_cache_response_ = std::move(response);
+ callback_data_handle_ = std::move(blob_data_handle);
run_loop->Quit();
}
@@ -196,7 +197,7 @@ class CacheStorageManagerTest : public testing::Test {
request->url = url;
base::RunLoop loop;
cache_manager_->MatchCache(
- origin, cache_name, request.Pass(),
+ origin, cache_name, std::move(request),
base::Bind(&CacheStorageManagerTest::CacheMatchCallback,
base::Unretained(this), base::Unretained(&loop)));
loop.Run();
@@ -210,7 +211,7 @@ class CacheStorageManagerTest : public testing::Test {
request->url = url;
base::RunLoop loop;
cache_manager_->MatchAllCaches(
- origin, request.Pass(),
+ origin, std::move(request),
base::Bind(&CacheStorageManagerTest::CacheMatchCallback,
base::Unretained(this), base::Unretained(&loop)));
loop.Run();
@@ -255,7 +256,7 @@ class CacheStorageManagerTest : public testing::Test {
new ServiceWorkerFetchRequest());
request->url = url;
base::RunLoop loop;
- cache->Match(request.Pass(),
+ cache->Match(std::move(request),
base::Bind(&CacheStorageManagerTest::CacheMatchCallback,
base::Unretained(this), base::Unretained(&loop)));
loop.Run();
@@ -470,7 +471,7 @@ TEST_F(CacheStorageManagerTest, StorageReuseCacheName) {
EXPECT_TRUE(CachePut(callback_cache_, kTestURL));
EXPECT_TRUE(CacheMatch(callback_cache_, kTestURL));
scoped_ptr<storage::BlobDataHandle> data_handle =
- callback_data_handle_.Pass();
+ std::move(callback_data_handle_);
EXPECT_TRUE(Delete(origin1_, "foo"));
// The cache is deleted but the handle to one of its entries is still

Powered by Google App Engine
This is Rietveld 408576698