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

Unified Diff: components/suggestions/image_manager.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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
« no previous file with comments | « components/storage_monitor/test_storage_monitor.cc ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/suggestions/image_manager.cc
diff --git a/components/suggestions/image_manager.cc b/components/suggestions/image_manager.cc
index 8b50dd392b0636f4a150cd433548e0d09a17816a..08cf3d782103662c1a20e6319ac689370ff2b390 100644
--- a/components/suggestions/image_manager.cc
+++ b/components/suggestions/image_manager.cc
@@ -4,6 +4,8 @@
#include "components/suggestions/image_manager.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/task_runner_util.h"
@@ -37,8 +39,8 @@ ImageManager::ImageManager(
scoped_ptr<ProtoDatabase<ImageData>> database,
const base::FilePath& database_dir,
scoped_refptr<base::TaskRunner> background_task_runner)
- : image_fetcher_(image_fetcher.Pass()),
- database_(database.Pass()),
+ : image_fetcher_(std::move(image_fetcher)),
+ database_(std::move(database)),
background_task_runner_(background_task_runner),
database_ready_(false),
weak_ptr_factory_(this) {
@@ -181,7 +183,8 @@ void ImageManager::SaveImage(const GURL& url, const SkBitmap& bitmap) {
scoped_ptr<std::vector<std::string>> keys_to_remove(
new std::vector<std::string>());
entries_to_save->push_back(std::make_pair(data.url(), data));
- database_->UpdateEntries(entries_to_save.Pass(), keys_to_remove.Pass(),
+ database_->UpdateEntries(std::move(entries_to_save),
+ std::move(keys_to_remove),
base::Bind(&ImageManager::OnDatabaseSave,
weak_ptr_factory_.GetWeakPtr()));
}
@@ -207,7 +210,7 @@ void ImageManager::OnDatabaseLoad(bool success,
}
database_ready_ = true;
- LoadEntriesInCache(entries.Pass());
+ LoadEntriesInCache(std::move(entries));
ServePendingCacheRequests();
}
« no previous file with comments | « components/storage_monitor/test_storage_monitor.cc ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698