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

Unified Diff: content/browser/cache_storage/cache_storage_cache_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_cache_unittest.cc
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc
index d87baa7bcecdfbb150102d6c28169c17d2aa1fce..b440758990e0a887262b52d8ce24ca4807d613d3 100644
--- a/content/browser/cache_storage/cache_storage_cache_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
@@ -55,7 +56,7 @@ scoped_ptr<storage::BlobProtocolHandler> CreateMockBlobProtocolHandler(
class DelayableBackend : public disk_cache::Backend {
public:
DelayableBackend(scoped_ptr<disk_cache::Backend> backend)
- : backend_(backend.Pass()), delay_open_(false) {}
+ : backend_(std::move(backend)), delay_open_(false) {}
// disk_cache::Backend overrides
net::CacheType GetCacheType() const override {
@@ -234,7 +235,8 @@ class TestCacheStorageCache : public CacheStorageCache {
// created before calling this.
DelayableBackend* UseDelayableBackend() {
EXPECT_TRUE(backend_);
- DelayableBackend* delayable_backend = new DelayableBackend(backend_.Pass());
+ DelayableBackend* delayable_backend =
+ new DelayableBackend(std::move(backend_));
backend_.reset(delayable_backend);
return delayable_backend;
}
@@ -446,10 +448,10 @@ class CacheStorageCacheTest : public testing::Test {
scoped_ptr<ServiceWorkerResponse> response,
scoped_ptr<storage::BlobDataHandle> body_handle) {
callback_error_ = error;
- callback_response_ = response.Pass();
+ callback_response_ = std::move(response);
callback_response_data_.reset();
if (error == CACHE_STORAGE_OK && !callback_response_->blob_uuid.empty())
- callback_response_data_ = body_handle.Pass();
+ callback_response_data_ = std::move(body_handle);
if (run_loop)
run_loop->Quit();
« no previous file with comments | « content/browser/cache_storage/cache_storage_cache.cc ('k') | content/browser/cache_storage/cache_storage_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698