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

Unified Diff: mojo/services/network/network_service_delegate.cc

Issue 1539863002: Convert Pass()→std::move() in mojo/services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing forward declare that was masked by pre-existing incorrect #include ordering. 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 | « mojo/services/network/network_context.cc ('k') | mojo/services/network/network_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/network_service_delegate.cc
diff --git a/mojo/services/network/network_service_delegate.cc b/mojo/services/network/network_service_delegate.cc
index d5b90db03215de947c449fe4fef18c75f8c1d059..9eea2f8372c90ea8948daf709ff7d2d24c83af9e 100644
--- a/mojo/services/network/network_service_delegate.cc
+++ b/mojo/services/network/network_service_delegate.cc
@@ -4,6 +4,8 @@
#include "mojo/services/network/network_service_delegate.h"
+#include <utility>
+
#include "base/at_exit.h"
#include "base/base_paths.h"
#include "base/bind.h"
@@ -32,7 +34,7 @@ class SQLThread : public base::Thread {
public:
SQLThread(filesystem::DirectoryPtr directory)
: base::Thread(kSQLThreadName),
- directory_info_(directory.PassInterface().Pass()) {
+ directory_info_(directory.PassInterface()) {
base::Thread::Options options;
options.message_pump_factory =
base::Bind(&mojo::common::MessagePumpMojo::Create);
@@ -42,8 +44,8 @@ class SQLThread : public base::Thread {
void Init() override {
filesystem::DirectoryPtr directory;
- directory.Bind(directory_info_.Pass());
- vfs_.reset(new sql::ScopedMojoFilesystemVFS(directory.Pass()));
+ directory.Bind(std::move(directory_info_));
+ vfs_.reset(new sql::ScopedMojoFilesystemVFS(std::move(directory)));
}
void CleanUp() override {
@@ -100,11 +102,11 @@ void NetworkServiceDelegate::Initialize(ApplicationImpl* app) {
filesystem::FileError error = filesystem::FILE_ERROR_FAILED;
filesystem::DirectoryPtr directory;
- files_->OpenFileSystem("origin", GetProxy(&directory), client.Pass(),
+ files_->OpenFileSystem("origin", GetProxy(&directory), std::move(client),
Capture(&error));
files_.WaitForIncomingResponse();
- io_worker_thread_.reset(new SQLThread(directory.Pass()));
+ io_worker_thread_.reset(new SQLThread(std::move(directory)));
#endif
// TODO(erg): Find everything else that writes to the filesystem and
@@ -157,15 +159,14 @@ void NetworkServiceDelegate::Quit() {
void NetworkServiceDelegate::Create(ApplicationConnection* connection,
InterfaceRequest<NetworkService> request) {
new NetworkServiceImpl(app_->app_lifetime_helper()->CreateAppRefCount(),
- request.Pass());
+ std::move(request));
}
void NetworkServiceDelegate::Create(ApplicationConnection* connection,
InterfaceRequest<CookieStore> request) {
- new CookieStoreImpl(context_.get(),
- GURL(connection->GetRemoteApplicationURL()).GetOrigin(),
- app_->app_lifetime_helper()->CreateAppRefCount(),
- request.Pass());
+ new CookieStoreImpl(
+ context_.get(), GURL(connection->GetRemoteApplicationURL()).GetOrigin(),
+ app_->app_lifetime_helper()->CreateAppRefCount(), std::move(request));
}
void NetworkServiceDelegate::Create(
@@ -173,7 +174,7 @@ void NetworkServiceDelegate::Create(
InterfaceRequest<WebSocketFactory> request) {
new WebSocketFactoryImpl(context_.get(),
app_->app_lifetime_helper()->CreateAppRefCount(),
- request.Pass());
+ std::move(request));
}
void NetworkServiceDelegate::Create(
@@ -181,7 +182,7 @@ void NetworkServiceDelegate::Create(
InterfaceRequest<URLLoaderFactory> request) {
new URLLoaderFactoryImpl(context_.get(),
app_->app_lifetime_helper()->CreateAppRefCount(),
- request.Pass());
+ std::move(request));
}
void NetworkServiceDelegate::OnFileSystemShutdown() {
« no previous file with comments | « mojo/services/network/network_context.cc ('k') | mojo/services/network/network_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698