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

Unified Diff: components/search_provider_logos/logo_tracker.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_tracker.cc
diff --git a/components/search_provider_logos/logo_tracker.cc b/components/search_provider_logos/logo_tracker.cc
index 43536fead794a0054956d341a351b536d89530e3..c50b42ceb3615a3e8989c2239eeca4484323026e 100644
--- a/components/search_provider_logos/logo_tracker.cc
+++ b/components/search_provider_logos/logo_tracker.cc
@@ -5,6 +5,7 @@
#include "components/search_provider_logos/logo_tracker.h"
#include <algorithm>
+#include <utility>
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
@@ -55,7 +56,7 @@ scoped_ptr<EncodedLogo> GetLogoFromCacheOnFileThread(LogoCache* logo_cache,
return scoped_ptr<EncodedLogo>();
}
- return logo_cache->GetCachedLogo().Pass();
+ return logo_cache->GetCachedLogo();
}
void DeleteLogoCacheOnFileThread(LogoCache* logo_cache) {
@@ -72,7 +73,7 @@ LogoTracker::LogoTracker(
scoped_ptr<LogoDelegate> delegate)
: is_idle_(true),
is_cached_logo_valid_(false),
- logo_delegate_(delegate.Pass()),
+ logo_delegate_(std::move(delegate)),
logo_cache_(new LogoCache(cached_logo_directory)),
clock_(new base::DefaultClock()),
file_task_runner_(file_task_runner),
@@ -135,7 +136,7 @@ void LogoTracker::SetLogoCacheForTests(scoped_ptr<LogoCache> cache) {
}
void LogoTracker::SetClockForTests(scoped_ptr<base::Clock> clock) {
- clock_ = clock.Pass();
+ clock_ = std::move(clock);
}
void LogoTracker::ReturnToIdle(int outcome) {
@@ -227,7 +228,7 @@ void LogoTracker::OnFreshLogoParsed(bool* parsing_failed,
logo->metadata.source_url = logo_url_.spec();
if (!logo || !logo->encoded_image.get()) {
- OnFreshLogoAvailable(logo.Pass(), *parsing_failed, SkBitmap());
+ OnFreshLogoAvailable(std::move(logo), *parsing_failed, SkBitmap());
} else {
// Store the value of logo->encoded_image for use below. This ensures that
// logo->encoded_image is evaulated before base::Passed(&logo), which sets
@@ -286,7 +287,7 @@ void LogoTracker::OnFreshLogoAvailable(scoped_ptr<EncodedLogo> encoded_logo,
FOR_EACH_OBSERVER(LogoObserver,
logo_observers_,
OnLogoAvailable(logo.get(), false));
- SetCachedLogo(encoded_logo.Pass());
+ SetCachedLogo(std::move(encoded_logo));
}
}
« no previous file with comments | « components/search_provider_logos/logo_cache.cc ('k') | components/security_interstitials/core/controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698