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

Unified Diff: mojo/shell/application_instance.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (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
« no previous file with comments | « mojo/runner/tracer.cc ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_instance.cc
diff --git a/mojo/shell/application_instance.cc b/mojo/shell/application_instance.cc
index 63851afac675ae43ab880871821b6ce7c801e744..586f7f9cec0e5060e453d2a32e31f434041b1206 100644
--- a/mojo/shell/application_instance.cc
+++ b/mojo/shell/application_instance.cc
@@ -4,6 +4,8 @@
#include "mojo/shell/application_instance.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/stl_util.h"
#include "mojo/application/public/interfaces/content_handler.mojom.h"
@@ -26,12 +28,11 @@ ApplicationInstance::ApplicationInstance(
identity.filter().count("*") == 1),
requesting_content_handler_id_(requesting_content_handler_id),
on_application_end_(on_application_end),
- application_(application.Pass()),
+ application_(std::move(application)),
binding_(this),
queue_requests_(false),
native_runner_(nullptr),
- pid_(base::kNullProcessId) {
-}
+ pid_(base::kNullProcessId) {}
ApplicationInstance::~ApplicationInstance() {
for (auto request : queued_client_requests_)
@@ -43,7 +44,7 @@ void ApplicationInstance::InitializeApplication() {
ShellPtr shell;
binding_.Bind(GetProxy(&shell));
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
- application_->Initialize(shell.Pass(), identity_.url().spec());
+ application_->Initialize(std::move(shell), identity_.url().spec());
}
void ApplicationInstance::ConnectToClient(
@@ -53,7 +54,7 @@ void ApplicationInstance::ConnectToClient(
return;
}
- CallAcceptConnection(params.Pass());
+ CallAcceptConnection(std::move(params));
}
void ApplicationInstance::SetNativeRunner(NativeRunner* native_runner) {
@@ -90,12 +91,12 @@ void ApplicationInstance::ConnectToApplication(
params->SetSource(this);
GURL app_url(app_request->url);
params->SetTargetURLRequest(
- app_request.Pass(),
+ std::move(app_request),
Identity(app_url, std::string(), capability_filter));
- params->set_services(services.Pass());
- params->set_exposed_services(exposed_services.Pass());
+ params->set_services(std::move(services));
+ params->set_exposed_services(std::move(exposed_services));
params->set_connect_callback(callback);
- manager_->ConnectToApplication(params.Pass());
+ manager_->ConnectToApplication(std::move(params));
} else {
LOG(WARNING) << "CapabilityFilter prevented connection from: " <<
identity_.url() << " to: " << url.spec();
@@ -120,7 +121,7 @@ void ApplicationInstance::CallAcceptConnection(
application_->AcceptConnection(
params->source().url().spec(), params->TakeServices(),
- params->TakeExposedServices(), Array<String>::From(interfaces).Pass(),
+ params->TakeExposedServices(), Array<String>::From(interfaces),
params->target().url().spec());
}
@@ -155,7 +156,7 @@ void ApplicationInstance::OnConnectionError() {
if (!request->target_url_request()) {
URLRequestPtr url_request = mojo::URLRequest::New();
url_request->url = request->target().url().spec();
- request->SetTargetURLRequest(url_request.Pass(), request->target());
+ request->SetTargetURLRequest(std::move(url_request), request->target());
}
manager->ConnectToApplication(make_scoped_ptr(request));
}
« no previous file with comments | « mojo/runner/tracer.cc ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698