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

Unified Diff: net/base/file_stream_context.cc

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 | « net/base/file_stream_context.h ('k') | remoting/base/typed_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context.cc
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc
index 3ddf4bbf508ea596c6be81c0eb6b4e70a807149f..6d77d6d778044a931b09d886ed2a3c9f225df069 100644
--- a/net/base/file_stream_context.cc
+++ b/net/base/file_stream_context.cc
@@ -4,6 +4,8 @@
#include "net/base/file_stream_context.h"
+#include <utility>
+
#include "base/files/file_path.h"
#include "base/location.h"
#include "base/profiler/scoped_tracker.h"
@@ -54,17 +56,13 @@ FileStream::Context::OpenResult::OpenResult(base::File file,
error_code(error_code) {
}
-FileStream::Context::OpenResult::OpenResult(RValue other)
- : file(other.object->file.Pass()),
- error_code(other.object->error_code) {
-}
+FileStream::Context::OpenResult::OpenResult(OpenResult&& other)
+ : file(std::move(other.file)), error_code(other.error_code) {}
FileStream::Context::OpenResult& FileStream::Context::OpenResult::operator=(
- RValue other) {
- if (this != other.object) {
- file = other.object->file.Pass();
- error_code = other.object->error_code;
- }
+ OpenResult&& other) {
+ file = std::move(other.file);
+ error_code = other.error_code;
return *this;
}
« no previous file with comments | « net/base/file_stream_context.h ('k') | remoting/base/typed_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698