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

Unified Diff: storage/browser/blob/scoped_file.h

Issue 2047633002: Revert of Remove base/move.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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 | « remoting/base/typed_buffer.h ('k') | styleguide/c++/c++11.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/scoped_file.h
diff --git a/storage/browser/blob/scoped_file.h b/storage/browser/blob/scoped_file.h
index da834740ac554d1d4453593c7fb58f5117eea206..583ce783927994d8685c200d6772a1708ea8813e 100644
--- a/storage/browser/blob/scoped_file.h
+++ b/storage/browser/blob/scoped_file.h
@@ -9,8 +9,8 @@
#include "base/callback_forward.h"
#include "base/files/file_path.h"
-#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/move.h"
#include "storage/browser/storage_browser_export.h"
namespace base {
@@ -27,6 +27,8 @@
// TODO(kinuko): Probably this can be moved under base or somewhere more
// common place.
class STORAGE_EXPORT ScopedFile {
+ MOVE_ONLY_TYPE_FOR_CPP_03(ScopedFile)
+
public:
typedef base::Callback<void(const base::FilePath&)> ScopeOutCallback;
typedef std::pair<ScopeOutCallback, scoped_refptr<base::TaskRunner> >
@@ -46,6 +48,8 @@
ScopeOutPolicy policy,
const scoped_refptr<base::TaskRunner>& file_task_runner);
+ // Move constructor and operator. The data of r-value will be transfered
+ // in a destructive way. (See base/move.h)
ScopedFile(ScopedFile&& other);
ScopedFile& operator=(ScopedFile&& rhs) {
MoveFrom(rhs);
@@ -80,8 +84,6 @@
ScopeOutPolicy scope_out_policy_;
scoped_refptr<base::TaskRunner> file_task_runner_;
ScopeOutCallbackList scope_out_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedFile);
};
} // namespace storage
« no previous file with comments | « remoting/base/typed_buffer.h ('k') | styleguide/c++/c++11.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698