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

Unified Diff: content/browser/file_descriptor_info_impl.cc

Issue 2594203004: Unifying ChildProcessLauncher across platforms. (Closed)
Patch Set: Clean-up. Created 3 years, 11 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 | « content/browser/file_descriptor_info_impl.h ('k') | content/browser/file_descriptor_info_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/file_descriptor_info_impl.cc
diff --git a/content/browser/file_descriptor_info_impl.cc b/content/browser/file_descriptor_info_impl.cc
index 33928197d25f361a6b6a691ca7a531629f48c1bb..1343e7c3141a382931723f29ddccd076dd048e38 100644
--- a/content/browser/file_descriptor_info_impl.cc
+++ b/content/browser/file_descriptor_info_impl.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
namespace content {
@@ -93,12 +94,13 @@ const base::FileHandleMappingVector& FileDescriptorInfoImpl::GetMapping()
return mapping_;
}
-base::FileHandleMappingVector
+std::unique_ptr<base::FileHandleMappingVector>
FileDescriptorInfoImpl::GetMappingWithIDAdjustment(int delta) const {
- base::FileHandleMappingVector result = mapping_;
+ std::unique_ptr<base::FileHandleMappingVector> result =
+ base::MakeUnique<base::FileHandleMappingVector>(mapping_);
// Adding delta to each ID.
for (unsigned i = 0; i < mapping_.size(); ++i)
- result[i].second += delta;
+ (*result)[i].second += delta;
return result;
}
« no previous file with comments | « content/browser/file_descriptor_info_impl.h ('k') | content/browser/file_descriptor_info_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698