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

Side by Side Diff: content/browser/dom_storage/session_storage_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/dom_storage/session_storage_database.h" 5 #include "content/browser/dom_storage/session_storage_database.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 bool res = 340 bool res =
341 db_->GetProperty("leveldb.approximate-memory-usage", &db_memory_usage); 341 db_->GetProperty("leveldb.approximate-memory-usage", &db_memory_usage);
342 DCHECK(res); 342 DCHECK(res);
343 } 343 }
344 344
345 uint64_t size; 345 uint64_t size;
346 bool res = base::StringToUint64(db_memory_usage, &size); 346 bool res = base::StringToUint64(db_memory_usage, &size);
347 DCHECK(res); 347 DCHECK(res);
348 348
349 auto mad = pmd->CreateAllocatorDump( 349 auto* mad = pmd->CreateAllocatorDump(
350 base::StringPrintf("dom_storage/session_storage_0x%" PRIXPTR, 350 base::StringPrintf("dom_storage/session_storage_0x%" PRIXPTR,
351 reinterpret_cast<uintptr_t>(this))); 351 reinterpret_cast<uintptr_t>(this)));
352 mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, 352 mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
353 base::trace_event::MemoryAllocatorDump::kUnitsBytes, size); 353 base::trace_event::MemoryAllocatorDump::kUnitsBytes, size);
354 354
355 // Memory is allocated from system allocator (malloc). 355 // Memory is allocated from system allocator (malloc).
356 const char* system_allocator_name = 356 const char* system_allocator_name =
357 base::trace_event::MemoryDumpManager::GetInstance() 357 base::trace_event::MemoryDumpManager::GetInstance()
358 ->system_allocator_pool_name(); 358 ->system_allocator_pool_name();
359 if (system_allocator_name) 359 if (system_allocator_name)
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 std::string SessionStorageDatabase::MapKey(const std::string& map_id, 764 std::string SessionStorageDatabase::MapKey(const std::string& map_id,
765 const std::string& key) { 765 const std::string& key) {
766 return base::StringPrintf("map-%s-%s", map_id.c_str(), key.c_str()); 766 return base::StringPrintf("map-%s-%s", map_id.c_str(), key.c_str());
767 } 767 }
768 768
769 const char* SessionStorageDatabase::NextMapIdKey() { 769 const char* SessionStorageDatabase::NextMapIdKey() {
770 return "next-map-id"; 770 return "next-map-id";
771 } 771 }
772 772
773 } // namespace content 773 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698