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

Side by Side Diff: net/disk_cache/blockfile/block_files.h

Issue 1894733002: Change scoped_ptr to std::unique_ptr in //net/disk_cache. (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
« no previous file with comments | « net/disk_cache/blockfile/backend_worker_v3.cc ('k') | net/disk_cache/blockfile/block_files.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 (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 // See net/disk_cache/disk_cache.h for the public interface. 5 // See net/disk_cache/disk_cache.h for the public interface.
6 6
7 #ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
8 #define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <memory>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
15 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
19 #include "net/disk_cache/blockfile/addr.h" 19 #include "net/disk_cache/blockfile/addr.h"
20 #include "net/disk_cache/blockfile/disk_format_base.h" 20 #include "net/disk_cache/blockfile/disk_format_base.h"
21 #include "net/disk_cache/blockfile/mapped_file.h" 21 #include "net/disk_cache/blockfile/mapped_file.h"
22 22
23 namespace base { 23 namespace base {
24 class ThreadChecker; 24 class ThreadChecker;
25 } 25 }
26 26
27 namespace disk_cache { 27 namespace disk_cache {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Retrieves stats for the given file index. 150 // Retrieves stats for the given file index.
151 void GetFileStats(int index, int* used_count, int* load); 151 void GetFileStats(int index, int* used_count, int* load);
152 152
153 // Returns the filename for a given file index. 153 // Returns the filename for a given file index.
154 base::FilePath Name(int index); 154 base::FilePath Name(int index);
155 155
156 bool init_; 156 bool init_;
157 char* zero_buffer_; // Buffer to speed-up cleaning deleted entries. 157 char* zero_buffer_; // Buffer to speed-up cleaning deleted entries.
158 base::FilePath path_; // Path to the backing folder. 158 base::FilePath path_; // Path to the backing folder.
159 std::vector<MappedFile*> block_files_; // The actual files. 159 std::vector<MappedFile*> block_files_; // The actual files.
160 scoped_ptr<base::ThreadChecker> thread_checker_; 160 std::unique_ptr<base::ThreadChecker> thread_checker_;
161 161
162 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_ZeroSizeFile); 162 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_ZeroSizeFile);
163 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile); 163 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile);
164 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile); 164 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile);
165 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats); 165 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats);
166 166
167 DISALLOW_COPY_AND_ASSIGN(BlockFiles); 167 DISALLOW_COPY_AND_ASSIGN(BlockFiles);
168 }; 168 };
169 169
170 } // namespace disk_cache 170 } // namespace disk_cache
171 171
172 #endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ 172 #endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/backend_worker_v3.cc ('k') | net/disk_cache/blockfile/block_files.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698