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

Unified Diff: content/browser/quota/quota_reservation_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/quota/quota_reservation_manager_unittest.cc
diff --git a/content/browser/quota/quota_reservation_manager_unittest.cc b/content/browser/quota/quota_reservation_manager_unittest.cc
index 7aca253e7fa4eeaf5cb5c4bcb65d1ec404cf64ec..d2588e168e7c2b29d10abd51217bb9c33dd9c87b 100644
--- a/content/browser/quota/quota_reservation_manager_unittest.cc
+++ b/content/browser/quota/quota_reservation_manager_unittest.cc
@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "storage/browser/fileapi/quota/quota_reservation_manager.h"
-
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -18,6 +17,7 @@
#include "base/thread_task_runner_handle.h"
#include "storage/browser/fileapi/quota/open_file_handle.h"
#include "storage/browser/fileapi/quota/quota_reservation.h"
+#include "storage/browser/fileapi/quota/quota_reservation_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
using storage::kFileSystemTypeTemporary;
@@ -102,12 +102,11 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
class FakeWriter {
public:
explicit FakeWriter(scoped_ptr<OpenFileHandle> handle)
- : handle_(handle.Pass()),
+ : handle_(std::move(handle)),
path_(handle_->platform_path()),
max_written_offset_(handle_->GetEstimatedFileSize()),
append_mode_write_amount_(0),
- dirty_(false) {
- }
+ dirty_(false) {}
~FakeWriter() {
if (handle_)
@@ -193,7 +192,7 @@ class QuotaReservationManagerTest : public testing::Test {
SetFileSize(file_path_, kInitialFileSize);
scoped_ptr<QuotaReservationManager::QuotaBackend> backend(new FakeBackend);
- reservation_manager_.reset(new QuotaReservationManager(backend.Pass()));
+ reservation_manager_.reset(new QuotaReservationManager(std::move(backend)));
}
void TearDown() override { reservation_manager_.reset(); }
« no previous file with comments | « content/browser/presentation/presentation_type_converters.h ('k') | content/browser/renderer_host/database_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698