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

Side by Side Diff: content/browser/file_descriptor_info_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/file_descriptor_info_impl.h" 5 #include "content/browser/file_descriptor_info_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // static 13 // static
14 scoped_ptr<FileDescriptorInfo> FileDescriptorInfoImpl::Create() { 14 std::unique_ptr<FileDescriptorInfo> FileDescriptorInfoImpl::Create() {
15 return scoped_ptr<FileDescriptorInfo>(new FileDescriptorInfoImpl()); 15 return std::unique_ptr<FileDescriptorInfo>(new FileDescriptorInfoImpl());
16 } 16 }
17 17
18 FileDescriptorInfoImpl::FileDescriptorInfoImpl() { 18 FileDescriptorInfoImpl::FileDescriptorInfoImpl() {
19 } 19 }
20 20
21 FileDescriptorInfoImpl::~FileDescriptorInfoImpl() { 21 FileDescriptorInfoImpl::~FileDescriptorInfoImpl() {
22 } 22 }
23 23
24 void FileDescriptorInfoImpl::Share(int id, base::PlatformFile fd) { 24 void FileDescriptorInfoImpl::Share(int id, base::PlatformFile fd) {
25 AddToMapping(id, fd); 25 AddToMapping(id, fd);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 base::FileHandleMappingVector 81 base::FileHandleMappingVector
82 FileDescriptorInfoImpl::GetMappingWithIDAdjustment(int delta) const { 82 FileDescriptorInfoImpl::GetMappingWithIDAdjustment(int delta) const {
83 base::FileHandleMappingVector result = mapping_; 83 base::FileHandleMappingVector result = mapping_;
84 // Adding delta to each ID. 84 // Adding delta to each ID.
85 for (unsigned i = 0; i < mapping_.size(); ++i) 85 for (unsigned i = 0; i < mapping_.size(); ++i)
86 result[i].second += delta; 86 result[i].second += delta;
87 return result; 87 return result;
88 } 88 }
89 89
90 } // namespace content 90 } // namespace content
OLDNEW
« 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