OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/base/chrome_test_suite.h" | 5 #include "chrome/test/base/chrome_test_suite.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #endif | 10 #endif |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
52 #include "base/mac/bundle_locations.h" | 52 #include "base/mac/bundle_locations.h" |
53 #include "base/mac/scoped_nsautorelease_pool.h" | 53 #include "base/mac/scoped_nsautorelease_pool.h" |
54 #if !defined(OS_IOS) | 54 #if !defined(OS_IOS) |
55 #include "base/mac/mac_util.h" | 55 #include "base/mac/mac_util.h" |
56 #include "chrome/browser/chrome_browser_application_mac.h" | 56 #include "chrome/browser/chrome_browser_application_mac.h" |
57 #endif // !defined(OS_IOS) | 57 #endif // !defined(OS_IOS) |
58 #endif | 58 #endif |
59 | 59 |
60 #if defined(OS_POSIX) | 60 #if defined(OS_POSIX) |
61 #include "base/shared_memory.h" | 61 #include "base/memory/shared_memory.h" |
62 #endif | 62 #endif |
63 | 63 |
64 namespace { | 64 namespace { |
65 | 65 |
66 void RemoveSharedMemoryFile(const std::string& filename) { | 66 void RemoveSharedMemoryFile(const std::string& filename) { |
67 // Stats uses SharedMemory under the hood. On posix, this results in a file | 67 // Stats uses SharedMemory under the hood. On posix, this results in a file |
68 // on disk. | 68 // on disk. |
69 #if defined(OS_POSIX) | 69 #if defined(OS_POSIX) |
70 base::SharedMemory memory; | 70 base::SharedMemory memory; |
71 memory.Delete(filename); | 71 memory.Delete(filename); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 #if defined(OS_MACOSX) && !defined(OS_IOS) | 301 #if defined(OS_MACOSX) && !defined(OS_IOS) |
302 base::mac::SetOverrideFrameworkBundle(NULL); | 302 base::mac::SetOverrideFrameworkBundle(NULL); |
303 #endif | 303 #endif |
304 | 304 |
305 base::StatsTable::set_current(NULL); | 305 base::StatsTable::set_current(NULL); |
306 stats_table_.reset(); | 306 stats_table_.reset(); |
307 RemoveSharedMemoryFile(stats_filename_); | 307 RemoveSharedMemoryFile(stats_filename_); |
308 | 308 |
309 base::TestSuite::Shutdown(); | 309 base::TestSuite::Shutdown(); |
310 } | 310 } |
OLD | NEW |