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

Unified Diff: content/browser/loader/mime_type_resource_handler.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/loader/mime_type_resource_handler.cc
diff --git a/content/browser/loader/mime_type_resource_handler.cc b/content/browser/loader/mime_type_resource_handler.cc
index 59c2b5310660487b1a0ccdc7f9591da7ebcc14bc..a95490145dbf19010a363f0b8e258fb8cf76625a 100644
--- a/content/browser/loader/mime_type_resource_handler.cc
+++ b/content/browser/loader/mime_type_resource_handler.cc
@@ -4,6 +4,7 @@
#include "content/browser/loader/mime_type_resource_handler.h"
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -86,7 +87,7 @@ MimeTypeResourceHandler::MimeTypeResourceHandler(
ResourceDispatcherHostImpl* host,
PluginService* plugin_service,
net::URLRequest* request)
- : LayeredResourceHandler(request, next_handler.Pass()),
+ : LayeredResourceHandler(request, std::move(next_handler)),
state_(STATE_STARTING),
host_(host),
plugin_service_(plugin_service),
@@ -94,8 +95,7 @@ MimeTypeResourceHandler::MimeTypeResourceHandler(
bytes_read_(0),
must_download_(false),
must_download_is_set_(false),
- weak_ptr_factory_(this) {
-}
+ weak_ptr_factory_(this) {}
MimeTypeResourceHandler::~MimeTypeResourceHandler() {
}
@@ -329,7 +329,7 @@ bool MimeTypeResourceHandler::SelectPluginHandler(bool* defer,
plugin_path, request(), response_.get(), &payload));
if (handler) {
*handled_by_plugin = true;
- return UseAlternateNextHandler(handler.Pass(), payload);
+ return UseAlternateNextHandler(std::move(handler), payload);
}
#endif
return true;
@@ -346,7 +346,7 @@ bool MimeTypeResourceHandler::SelectNextHandler(bool* defer) {
info->set_is_download(true);
scoped_ptr<ResourceHandler> handler(
new CertificateResourceHandler(request()));
- return UseAlternateNextHandler(handler.Pass(), std::string());
+ return UseAlternateNextHandler(std::move(handler), std::string());
}
// Allow requests for object/embed tags to be intercepted as streams.
@@ -391,7 +391,7 @@ bool MimeTypeResourceHandler::SelectNextHandler(bool* defer) {
DownloadItem::kInvalidId,
scoped_ptr<DownloadSaveInfo>(new DownloadSaveInfo()),
DownloadUrlParameters::OnStartedCallback()));
- return UseAlternateNextHandler(handler.Pass(), std::string());
+ return UseAlternateNextHandler(std::move(handler), std::string());
}
bool MimeTypeResourceHandler::UseAlternateNextHandler(
@@ -443,7 +443,7 @@ bool MimeTypeResourceHandler::UseAlternateNextHandler(
// This is handled entirely within the new ResourceHandler, so just reset the
// original ResourceHandler.
- next_handler_ = new_handler.Pass();
+ next_handler_ = std::move(new_handler);
next_handler_->SetController(this);
return CopyReadBufferToNextHandler();
« no previous file with comments | « content/browser/loader/layered_resource_handler.cc ('k') | content/browser/loader/mime_type_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698