OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/host_discardable_shared_memory_manager.h" | 5 #include "content/common/host_discardable_shared_memory_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> |
9 | 10 |
10 #include "base/threading/simple_thread.h" | 11 #include "base/threading/simple_thread.h" |
11 #include "content/public/common/child_process_host.h" | 12 #include "content/public/common/child_process_host.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 namespace { | 16 namespace { |
16 | 17 |
17 class TestDiscardableSharedMemory : public base::DiscardableSharedMemory { | 18 class TestDiscardableSharedMemory : public base::DiscardableSharedMemory { |
18 public: | 19 public: |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // Set the memory limit to a value that will require EnforceMemoryPolicy() | 279 // Set the memory limit to a value that will require EnforceMemoryPolicy() |
279 // to be schedule on a thread without a message loop. | 280 // to be schedule on a thread without a message loop. |
280 SetMemoryLimitRunner runner(manager_.get(), kDataSize - 1); | 281 SetMemoryLimitRunner runner(manager_.get(), kDataSize - 1); |
281 base::DelegateSimpleThread thread(&runner, "memory_limit_setter"); | 282 base::DelegateSimpleThread thread(&runner, "memory_limit_setter"); |
282 thread.Start(); | 283 thread.Start(); |
283 thread.Join(); | 284 thread.Join(); |
284 } | 285 } |
285 | 286 |
286 } // namespace | 287 } // namespace |
287 } // namespace content | 288 } // namespace content |
OLD | NEW |