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

Side by Side Diff: content/browser/indexed_db/leveldb/leveldb_database.cc

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/indexed_db/leveldb/leveldb_database.h" 5 #include "content/browser/indexed_db/leveldb/leveldb_database.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cerrno> 10 #include <cerrno>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 base::trace_event::ProcessMemoryDump* pmd) { 454 base::trace_event::ProcessMemoryDump* pmd) {
455 if (!db_) 455 if (!db_)
456 return false; 456 return false;
457 457
458 std::string value; 458 std::string value;
459 uint64_t size; 459 uint64_t size;
460 bool res = db_->GetProperty("leveldb.approximate-memory-usage", &value); 460 bool res = db_->GetProperty("leveldb.approximate-memory-usage", &value);
461 DCHECK(res); 461 DCHECK(res);
462 base::StringToUint64(value, &size); 462 base::StringToUint64(value, &size);
463 463
464 auto dump = pmd->CreateAllocatorDump(base::StringPrintf( 464 auto* dump = pmd->CreateAllocatorDump(base::StringPrintf(
465 "leveldb/index_db/0x%" PRIXPTR, reinterpret_cast<uintptr_t>(db_.get()))); 465 "leveldb/index_db/0x%" PRIXPTR, reinterpret_cast<uintptr_t>(db_.get())));
466 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, 466 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
467 base::trace_event::MemoryAllocatorDump::kUnitsBytes, size); 467 base::trace_event::MemoryAllocatorDump::kUnitsBytes, size);
468 dump->AddString("file_name", "", file_name_for_tracing); 468 dump->AddString("file_name", "", file_name_for_tracing);
469 469
470 // Memory is allocated from system allocator (malloc). 470 // Memory is allocated from system allocator (malloc).
471 pmd->AddSuballocation(dump->guid(), 471 pmd->AddSuballocation(dump->guid(),
472 base::trace_event::MemoryDumpManager::GetInstance() 472 base::trace_event::MemoryDumpManager::GetInstance()
473 ->system_allocator_pool_name()); 473 ->system_allocator_pool_name());
474 return true; 474 return true;
475 } 475 }
476 476
477 } // namespace content 477 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/loader/async_revalidation_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698