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

Unified Diff: content/browser/background_sync/background_sync_service_impl.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/background_sync/background_sync_service_impl.cc
diff --git a/content/browser/background_sync/background_sync_service_impl.cc b/content/browser/background_sync/background_sync_service_impl.cc
index f90433d4624a263687a84509e70b3c4c2c4030db..ffab6abc995915522e9a114c970dd535b672e27b 100644
--- a/content/browser/background_sync/background_sync_service_impl.cc
+++ b/content/browser/background_sync/background_sync_service_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/background_sync/background_sync_service_impl.h"
+#include <utility>
+
#include "background_sync_registration_handle.h"
#include "base/memory/weak_ptr.h"
#include "base/stl_util.h"
@@ -41,7 +43,7 @@ SyncRegistrationPtr ToMojoRegistration(
static_cast<content::BackgroundSyncPowerState>(in.options()->power_state);
out->network_state = static_cast<content::BackgroundSyncNetworkState>(
in.options()->network_state);
- return out.Pass();
+ return out;
}
} // namespace
@@ -97,7 +99,7 @@ BackgroundSyncServiceImpl::BackgroundSyncServiceImpl(
BackgroundSyncContextImpl* background_sync_context,
mojo::InterfaceRequest<BackgroundSyncService> request)
: background_sync_context_(background_sync_context),
- binding_(this, request.Pass()),
+ binding_(this, std::move(request)),
weak_ptr_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(background_sync_context);
@@ -212,7 +214,7 @@ void BackgroundSyncServiceImpl::DuplicateRegistrationHandle(
active_handles_.AddWithID(registration_handle.release(),
handle_ptr->handle_id());
SyncRegistrationPtr mojoResult = ToMojoRegistration(*handle_ptr);
- callback.Run(BACKGROUND_SYNC_ERROR_NONE, mojoResult.Pass());
+ callback.Run(BACKGROUND_SYNC_ERROR_NONE, std::move(mojoResult));
}
void BackgroundSyncServiceImpl::ReleaseRegistration(
@@ -260,7 +262,7 @@ void BackgroundSyncServiceImpl::OnRegisterResult(
active_handles_.AddWithID(result.release(), result_ptr->handle_id());
SyncRegistrationPtr mojoResult = ToMojoRegistration(*result_ptr);
callback.Run(static_cast<content::BackgroundSyncError>(status),
- mojoResult.Pass());
+ std::move(mojoResult));
}
void BackgroundSyncServiceImpl::OnUnregisterResult(
@@ -287,7 +289,7 @@ void BackgroundSyncServiceImpl::OnGetRegistrationsResult(
result_registrations->weak_clear();
callback.Run(static_cast<content::BackgroundSyncError>(status),
- mojo_registrations.Pass());
+ std::move(mojo_registrations));
}
void BackgroundSyncServiceImpl::OnNotifyWhenFinishedResult(

Powered by Google App Engine
This is Rietveld 408576698