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 |