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

Unified Diff: components/search_provider_logos/logo_cache.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
Index: components/search_provider_logos/logo_cache.cc
diff --git a/components/search_provider_logos/logo_cache.cc b/components/search_provider_logos/logo_cache.cc
index 4ceb6d882ce0922d50e36b21dd89b067f642f056..207ff5a18e5ca473902c1d4d62c9b8650cf65d74 100644
--- a/components/search_provider_logos/logo_cache.cc
+++ b/components/search_provider_logos/logo_cache.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
@@ -84,7 +85,7 @@ void LogoCache::SetCachedLogo(const EncodedLogo* logo) {
metadata.reset(new LogoMetadata(logo->metadata));
logo_num_bytes_ = static_cast<int>(logo->encoded_image->size());
}
- UpdateMetadata(metadata.Pass());
+ UpdateMetadata(std::move(metadata));
WriteLogo(logo ? logo->encoded_image : NULL);
}
@@ -112,7 +113,7 @@ scoped_ptr<EncodedLogo> LogoCache::GetCachedLogo() {
scoped_ptr<EncodedLogo> logo(new EncodedLogo());
logo->encoded_image = encoded_image;
logo->metadata = *metadata_;
- return logo.Pass();
+ return logo;
}
// static
@@ -137,7 +138,7 @@ scoped_ptr<LogoMetadata> LogoCache::LogoMetadataFromString(
return scoped_ptr<LogoMetadata>();
}
- return metadata.Pass();
+ return metadata;
}
// static
@@ -167,7 +168,7 @@ base::FilePath LogoCache::GetMetadataPath() {
}
void LogoCache::UpdateMetadata(scoped_ptr<LogoMetadata> metadata) {
- metadata_ = metadata.Pass();
+ metadata_ = std::move(metadata);
metadata_is_valid_ = true;
}
@@ -186,7 +187,7 @@ void LogoCache::ReadMetadataIfNeeded() {
}
}
- UpdateMetadata(metadata.Pass());
+ UpdateMetadata(std::move(metadata));
}
void LogoCache::WriteMetadata() {
« no previous file with comments | « components/search_provider_logos/google_logo_api.cc ('k') | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698