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

Unified Diff: net/disk_cache/blockfile/index_table_v3.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/blockfile/index_table_v3.h ('k') | net/disk_cache/blockfile/index_table_v3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/index_table_v3.cc
diff --git a/net/disk_cache/blockfile/index_table_v3.cc b/net/disk_cache/blockfile/index_table_v3.cc
index 9dca3de0596ba7e28483a6c948f5dbce2626d724..9c53915464871c1b2948fefbe2884ca5cb3203da 100644
--- a/net/disk_cache/blockfile/index_table_v3.cc
+++ b/net/disk_cache/blockfile/index_table_v3.cc
@@ -458,7 +458,7 @@ IndexTable::~IndexTable() {
// table.
void IndexTable::Init(IndexTableInitData* params) {
bool growing = header_ != NULL;
- scoped_ptr<IndexBucket[]> old_extra_table;
+ std::unique_ptr<IndexBucket[]> old_extra_table;
header_ = &params->index_bitmap->header;
if (params->main_table) {
@@ -528,7 +528,7 @@ void IndexTable::Init(IndexTableInitData* params) {
if (growing) {
int old_num_words = (backup_header_.get()->table_len + 31) / 32;
DCHECK_GE(num_words, old_num_words);
- scoped_ptr<uint32_t[]> storage(new uint32_t[num_words]);
+ std::unique_ptr<uint32_t[]> storage(new uint32_t[num_words]);
memcpy(storage.get(), backup_bitmap_storage_.get(),
old_num_words * sizeof(int32_t));
memset(storage.get() + old_num_words, 0,
@@ -962,7 +962,7 @@ void IndexTable::MoveCells(IndexBucket* old_extra_table) {
// in other words 'multiplier' >> 1.
uint32_t new_bit = (1 << extra_bits_) >> 1;
- scoped_ptr<IndexBucket[]> old_main_table;
+ std::unique_ptr<IndexBucket[]> old_main_table;
IndexBucket* source_table = main_table_;
bool upgrade_format = !extra_bits_;
if (upgrade_format) {
« no previous file with comments | « net/disk_cache/blockfile/index_table_v3.h ('k') | net/disk_cache/blockfile/index_table_v3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698