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

Side by Side Diff: cc/base/list_container_helper.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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
« no previous file with comments | « cc/base/list_container.h ('k') | cc/base/list_container_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CC_BASE_LIST_CONTAINER_HELPER_H_ 5 #ifndef CC_BASE_LIST_CONTAINER_HELPER_H_
6 #define CC_BASE_LIST_CONTAINER_HELPER_H_ 6 #define CC_BASE_LIST_CONTAINER_HELPER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
13 14
14 namespace cc { 15 namespace cc {
15 16
16 // Helper class for ListContainer non-templated logic. All methods are private, 17 // Helper class for ListContainer non-templated logic. All methods are private,
17 // and only exposed to friend classes. 18 // and only exposed to friend classes.
18 // For usage, see comments in ListContainer (list_container.h). 19 // For usage, see comments in ListContainer (list_container.h).
19 class CC_EXPORT ListContainerHelper final { 20 class CC_EXPORT ListContainerHelper final {
20 private: 21 private:
21 template <typename T> 22 template <typename T>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 // Unlike the ListContainer method, this one does not invoke element 166 // Unlike the ListContainer method, this one does not invoke element
166 // destructors. 167 // destructors.
167 void clear(); 168 void clear();
168 169
169 size_t AvailableSizeWithoutAnotherAllocationForTesting() const; 170 size_t AvailableSizeWithoutAnotherAllocationForTesting() const;
170 171
171 // Hands out memory location for an element at the end of data structure. 172 // Hands out memory location for an element at the end of data structure.
172 void* Allocate(size_t size_of_actual_element_in_bytes); 173 void* Allocate(size_t size_of_actual_element_in_bytes);
173 174
174 scoped_ptr<CharAllocator> data_; 175 std::unique_ptr<CharAllocator> data_;
175 176
176 DISALLOW_COPY_AND_ASSIGN(ListContainerHelper); 177 DISALLOW_COPY_AND_ASSIGN(ListContainerHelper);
177 }; 178 };
178 179
179 } // namespace cc 180 } // namespace cc
180 181
181 #endif // CC_BASE_LIST_CONTAINER_HELPER_H_ 182 #endif // CC_BASE_LIST_CONTAINER_HELPER_H_
OLDNEW
« no previous file with comments | « cc/base/list_container.h ('k') | cc/base/list_container_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698