diff options
author | dcheng <dcheng@chromium.org> | 2015-12-18 09:48:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 17:48:52 +0000 |
commit | e59eca16010c109a5e3e4922189c8b264d34caa9 (patch) | |
tree | 838815399c6364a99a465938df9978aeaf75c766 /extensions/browser/updater | |
parent | 5100baf1eac806abbdaaf8002887aacf652f34e5 (diff) | |
download | chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.zip chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.gz chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.bz2 |
Convert Pass()→std::move() in //extensions
BUG=557422
Review URL: https://codereview.chromium.org/1537893002
Cr-Commit-Position: refs/heads/master@{#366120}
Diffstat (limited to 'extensions/browser/updater')
-rw-r--r-- | extensions/browser/updater/extension_downloader.cc | 16 | ||||
-rw-r--r-- | extensions/browser/updater/request_queue_impl.h | 10 |
2 files changed, 14 insertions, 12 deletions
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc index 4e243b0..1c7dafb 100644 --- a/extensions/browser/updater/extension_downloader.cc +++ b/extensions/browser/updater/extension_downloader.cc @@ -268,7 +268,7 @@ void ExtensionDownloader::StartBlacklistUpdate( DCHECK(blacklist_fetch->base_url().SchemeIsCryptographic()); blacklist_fetch->AddExtension(kBlacklistAppID, version, &ping_data, std::string(), kDefaultInstallSource); - StartUpdateCheck(blacklist_fetch.Pass()); + StartUpdateCheck(std::move(blacklist_fetch)); } void ExtensionDownloader::SetWebstoreIdentityProvider( @@ -429,7 +429,7 @@ void ExtensionDownloader::StartUpdateCheck( "Extensions.UpdateCheckUrlLength", fetch_data->full_url().possibly_invalid_spec().length()); - manifests_queue_.ScheduleRequest(fetch_data.Pass()); + manifests_queue_.ScheduleRequest(std::move(fetch_data)); } } @@ -570,7 +570,7 @@ void ExtensionDownloader::HandleManifestResults( scoped_ptr<ExtensionFetch> fetch( new ExtensionFetch(update->extension_id, crx_url, update->package_hash, update->version, fetch_data->request_ids())); - FetchUpdatedExtension(fetch.Pass()); + FetchUpdatedExtension(std::move(fetch)); } // If the manifest response included a <daystart> element, we want to save @@ -686,9 +686,10 @@ void ExtensionDownloader::FetchUpdatedExtension( // Now get .crx file path and mark extension as used. extension_cache_->GetExtension(fetch_data->id, fetch_data->package_hash, &crx_path, &version); - NotifyDelegateDownloadFinished(fetch_data.Pass(), true, crx_path, false); + NotifyDelegateDownloadFinished(std::move(fetch_data), true, crx_path, + false); } else { - extensions_queue_.ScheduleRequest(fetch_data.Pass()); + extensions_queue_.ScheduleRequest(std::move(fetch_data)); } } } @@ -721,7 +722,7 @@ void ExtensionDownloader::CacheInstallDone( ping_results_.erase(fetch_data->id); if (should_download) { // Resume download from cached manifest data. - extensions_queue_.ScheduleRequest(fetch_data.Pass()); + extensions_queue_.ScheduleRequest(std::move(fetch_data)); } } @@ -797,7 +798,8 @@ void ExtensionDownloader::OnCRXFetchComplete( weak_ptr_factory_.GetWeakPtr(), base::Passed(&fetch_data), false)); } else { - NotifyDelegateDownloadFinished(fetch_data.Pass(), false, crx_path, true); + NotifyDelegateDownloadFinished(std::move(fetch_data), false, crx_path, + true); } } else if (IterateFetchCredentialsAfterFailure( &active_request, status, response_code)) { diff --git a/extensions/browser/updater/request_queue_impl.h b/extensions/browser/updater/request_queue_impl.h index 309dc82..9e88824 100644 --- a/extensions/browser/updater/request_queue_impl.h +++ b/extensions/browser/updater/request_queue_impl.h @@ -6,6 +6,7 @@ #define EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_ #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/compiler_specific.h" @@ -41,14 +42,13 @@ int RequestQueue<T>::active_request_failure_count() { template <typename T> scoped_ptr<T> RequestQueue<T>::reset_active_request() { active_backoff_entry_.reset(); - return active_request_.Pass(); + return std::move(active_request_); } template <typename T> void RequestQueue<T>::ScheduleRequest(scoped_ptr<T> request) { - PushImpl( - request.Pass(), - scoped_ptr<net::BackoffEntry>(new net::BackoffEntry(backoff_policy_))); + PushImpl(std::move(request), scoped_ptr<net::BackoffEntry>( + new net::BackoffEntry(backoff_policy_))); StartNextRequest(); } @@ -124,7 +124,7 @@ void RequestQueue<T>::RetryRequest(const base::TimeDelta& min_backoff_delay) { active_backoff_entry_->SetCustomReleaseTime(base::TimeTicks::Now() + min_backoff_delay); } - PushImpl(active_request_.Pass(), active_backoff_entry_.Pass()); + PushImpl(std::move(active_request_), std::move(active_backoff_entry_)); } template <typename T> |