Index: components/nacl/renderer/ppb_nacl_private_impl.cc |
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc |
index 7e191dc94bcc11d7707fc6beaec9f6cb8464c762..6cbdfe43b49d192c20d296ccb3192fda4ef0d01e 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -6,9 +6,9 @@ |
#include <stddef.h> |
#include <stdint.h> |
- |
#include <numeric> |
#include <string> |
+#include <utility> |
#include <vector> |
#include "base/bind.h" |
@@ -537,7 +537,7 @@ void LaunchSelLdr(PP_Instance instance, |
launch_result.trusted_ipc_channel_handle, |
content::RenderThread::Get()->GetShutdownEvent(), |
is_helper_nexe)); |
- load_manager->set_trusted_plugin_channel(trusted_plugin_channel.Pass()); |
+ load_manager->set_trusted_plugin_channel(std::move(trusted_plugin_channel)); |
} else { |
PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
return; |
@@ -549,10 +549,10 @@ void LaunchSelLdr(PP_Instance instance, |
new ManifestServiceChannel( |
launch_result.manifest_service_ipc_channel_handle, |
base::Bind(&PostPPCompletionCallback, callback), |
- manifest_service_proxy.Pass(), |
+ std::move(manifest_service_proxy), |
content::RenderThread::Get()->GetShutdownEvent())); |
load_manager->set_manifest_service_channel( |
- manifest_service_channel.Pass()); |
+ std::move(manifest_service_channel)); |
} |
} |
@@ -575,7 +575,7 @@ PP_Bool StartPpapiProxy(PP_Instance instance) { |
return PP_FALSE; |
} |
scoped_ptr<InstanceInfo> instance_info = |
- nacl_plugin_instance->instance_info.Pass(); |
+ std::move(nacl_plugin_instance->instance_info); |
PP_ExternalPluginResult result = plugin_instance->SwitchToOutOfProcessProxy( |
base::FilePath().AppendASCII(instance_info->url.spec()), |
@@ -863,7 +863,7 @@ void InstanceCreated(PP_Instance instance) { |
InstanceMap& map = g_instance_map.Get(); |
CHECK(map.find(instance) == map.end()); // Sanity check. |
scoped_ptr<NaClPluginInstance> new_instance(new NaClPluginInstance(instance)); |
- map.add(instance, new_instance.Pass()); |
+ map.add(instance, std::move(new_instance)); |
} |
void InstanceDestroyed(PP_Instance instance) { |
@@ -1006,10 +1006,9 @@ void DownloadManifestToBuffer(PP_Instance instance, |
// ManifestDownloader deletes itself after invoking the callback. |
ManifestDownloader* manifest_downloader = new ManifestDownloader( |
- url_loader.Pass(), |
- load_manager->is_installed(), |
- base::Bind(DownloadManifestToBufferCompletion, |
- instance, callback, base::Time::Now())); |
+ std::move(url_loader), load_manager->is_installed(), |
+ base::Bind(DownloadManifestToBufferCompletion, instance, callback, |
+ base::Time::Now())); |
manifest_downloader->Load(request); |
} |
@@ -1348,8 +1347,7 @@ void DownloadNexe(PP_Instance instance, |
// FileDownloader deletes itself after invoking DownloadNexeCompletion. |
FileDownloader* file_downloader = new FileDownloader( |
- url_loader.Pass(), |
- target_file.Pass(), |
+ std::move(url_loader), std::move(target_file), |
base::Bind(&DownloadNexeCompletion, request, out_file_info), |
base::Bind(&ProgressEventRateLimiter::ReportProgress, |
base::Owned(tracker), std::string(url))); |
@@ -1497,12 +1495,11 @@ void DownloadFile(PP_Instance instance, |
ProgressEventRateLimiter* tracker = new ProgressEventRateLimiter(instance); |
// FileDownloader deletes itself after invoking DownloadNexeCompletion. |
- FileDownloader* file_downloader = new FileDownloader( |
- url_loader.Pass(), |
- target_file.Pass(), |
- base::Bind(&DownloadFileCompletion, callback), |
- base::Bind(&ProgressEventRateLimiter::ReportProgress, |
- base::Owned(tracker), std::string(url))); |
+ FileDownloader* file_downloader = |
+ new FileDownloader(std::move(url_loader), std::move(target_file), |
+ base::Bind(&DownloadFileCompletion, callback), |
+ base::Bind(&ProgressEventRateLimiter::ReportProgress, |
+ base::Owned(tracker), std::string(url))); |
file_downloader->Load(url_request); |
} |
@@ -1545,7 +1542,7 @@ class PexeDownloader : public blink::WebURLLoaderClient { |
const PPP_PexeStreamHandler* stream_handler, |
void* stream_handler_user_data) |
: instance_(instance), |
- url_loader_(url_loader.Pass()), |
+ url_loader_(std::move(url_loader)), |
pexe_url_(pexe_url), |
pexe_opt_level_(pexe_opt_level), |
use_subzero_(use_subzero), |
@@ -1686,7 +1683,7 @@ void StreamPexe(PP_Instance instance, |
scoped_ptr<blink::WebURLLoader> url_loader( |
CreateWebURLLoader(document, gurl)); |
PexeDownloader* downloader = |
- new PexeDownloader(instance, url_loader.Pass(), pexe_url, opt_level, |
+ new PexeDownloader(instance, std::move(url_loader), pexe_url, opt_level, |
PP_ToBool(use_subzero), handler, handler_user_data); |
blink::WebURLRequest url_request = CreateWebURLRequest(document, gurl); |