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

Side by Side Diff: components/html_viewer/discardable_memory_allocator.h

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 12 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 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 COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_
6 #define COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_ 6 #define COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_
7 7
8 #include <stddef.h>
9
8 #include <list> 10 #include <list>
9 11
12 #include "base/macros.h"
10 #include "base/memory/discardable_memory_allocator.h" 13 #include "base/memory/discardable_memory_allocator.h"
11 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
12 15
13 namespace html_viewer { 16 namespace html_viewer {
14 17
15 // A discarable memory allocator which will unallocate chunks on new 18 // A discarable memory allocator which will unallocate chunks on new
16 // allocations. 19 // allocations.
17 class DiscardableMemoryAllocator : public base::DiscardableMemoryAllocator { 20 class DiscardableMemoryAllocator : public base::DiscardableMemoryAllocator {
18 public: 21 public:
19 explicit DiscardableMemoryAllocator(size_t desired_max_memory); 22 explicit DiscardableMemoryAllocator(size_t desired_max_memory);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // A linked list of unlocked allocated chunks so that the tail is most 63 // A linked list of unlocked allocated chunks so that the tail is most
61 // recently accessed chunks. 64 // recently accessed chunks.
62 std::list<DiscardableMemoryChunkImpl*> live_unlocked_chunks_; 65 std::list<DiscardableMemoryChunkImpl*> live_unlocked_chunks_;
63 66
64 DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAllocator); 67 DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAllocator);
65 }; 68 };
66 69
67 } // namespace html_viewer 70 } // namespace html_viewer
68 71
69 #endif // COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_ 72 #endif // COMPONENTS_HTML_VIEWER_DISCARDABLE_MEMORY_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « components/html_viewer/blink_url_request_type_converters.cc ('k') | components/html_viewer/discardable_memory_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698