OLD | NEW |
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 "components/nacl/browser/pnacl_host.h" | 5 #include "components/nacl/browser/pnacl_host.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <string.h> |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
11 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
12 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
13 #include "base/threading/sequenced_worker_pool.h" | 15 #include "base/threading/sequenced_worker_pool.h" |
| 16 #include "build/build_config.h" |
14 #include "components/nacl/browser/pnacl_translation_cache.h" | 17 #include "components/nacl/browser/pnacl_translation_cache.h" |
15 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
18 #include "net/base/test_completion_callback.h" | 21 #include "net/base/test_completion_callback.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
20 | 23 |
21 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
22 #define snprintf _snprintf | 25 #define snprintf _snprintf |
23 #endif | 26 #endif |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // Since there's no easy way to pump message queues one message at a time, we | 454 // Since there's no easy way to pump message queues one message at a time, we |
452 // have to simulate what would happen if 1 DeInitIfsafe task gets queued, then | 455 // have to simulate what would happen if 1 DeInitIfsafe task gets queued, then |
453 // a GetNexeFd gets queued, and then another DeInitIfSafe gets queued before | 456 // a GetNexeFd gets queued, and then another DeInitIfSafe gets queued before |
454 // the first one runs. We can just shortcut and call DeInitIfSafe while the | 457 // the first one runs. We can just shortcut and call DeInitIfSafe while the |
455 // cache is still initializing. | 458 // cache is still initializing. |
456 DeInit(); | 459 DeInit(); |
457 base::RunLoop().RunUntilIdle(); | 460 base::RunLoop().RunUntilIdle(); |
458 } | 461 } |
459 | 462 |
460 } // namespace pnacl | 463 } // namespace pnacl |
OLD | NEW |