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

Unified Diff: content/child/scoped_web_callbacks.h

Issue 1407443002: Remove old C++03 move emulation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: std::move and reflow Created 5 years, 1 month 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 | « components/nacl/browser/nacl_process_host.cc ('k') | dbus/file_descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/scoped_web_callbacks.h
diff --git a/content/child/scoped_web_callbacks.h b/content/child/scoped_web_callbacks.h
index 7f578dda93f41a2eb9d6f7918694241ad5aa4d7d..b0c3b2b4c4c6f31a165c37ab3b1a59c267af6557 100644
--- a/content/child/scoped_web_callbacks.h
+++ b/content/child/scoped_web_callbacks.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_CHILD_SCOPED_WEB_CALLBACKS_H_
#define CONTENT_CHILD_SCOPED_WEB_CALLBACKS_H_
+#include <utility>
+
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/move.h"
@@ -64,7 +66,7 @@
// our desired default behavior before deleting the WebCallbacks.
template <typename CallbacksType>
class ScopedWebCallbacks {
- MOVE_ONLY_TYPE_FOR_CPP_03(ScopedWebCallbacks, RValue);
+ MOVE_ONLY_TYPE_FOR_CPP_03(ScopedWebCallbacks);
public:
using DestructionCallback =
@@ -80,11 +82,11 @@ class ScopedWebCallbacks {
destruction_callback_.Run(callbacks_.Pass());
}
- ScopedWebCallbacks(RValue other) { *this = other; }
+ ScopedWebCallbacks(ScopedWebCallbacks&& other) { *this = std::move(other); }
- ScopedWebCallbacks& operator=(RValue other) {
- callbacks_ = other.object->callbacks_.Pass();
- destruction_callback_ = other.object->destruction_callback_;
+ ScopedWebCallbacks& operator=(ScopedWebCallbacks&& other) {
+ callbacks_ = std::move(other.callbacks_);
+ destruction_callback_ = other.destruction_callback_;
return *this;
}
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | dbus/file_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698