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

Side by Side Diff: base/memory/discardable_memory_emulated.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « base/memory/discardable_memory_emulated.h ('k') | base/memory/discardable_memory_linux.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 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 "base/memory/discardable_memory_emulated.h" 5 #include "base/memory/discardable_memory_emulated.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/discardable_memory_manager.h" 8 #include "base/memory/discardable_memory_manager.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return true; 106 return true;
107 107
108 memory_.reset(new uint8[bytes_]); 108 memory_.reset(new uint8[bytes_]);
109 return false; 109 return false;
110 } 110 }
111 111
112 void DiscardableMemoryEmulated::Purge() { 112 void DiscardableMemoryEmulated::Purge() {
113 memory_.reset(); 113 memory_.reset();
114 } 114 }
115 115
116 bool DiscardableMemoryEmulated::IsMemoryResident() const {
117 return true;
118 }
119
116 } // namespace internal 120 } // namespace internal
117 } // namespace base 121 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_emulated.h ('k') | base/memory/discardable_memory_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698