| 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 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/metrics/stats_table.h" | 10 #include "base/metrics/stats_table.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "base/mac/bundle_locations.h" | 32 #include "base/mac/bundle_locations.h" |
| 33 #include "base/mac/mac_util.h" | 33 #include "base/mac/mac_util.h" |
| 34 #include "base/mac/scoped_nsautorelease_pool.h" | 34 #include "base/mac/scoped_nsautorelease_pool.h" |
| 35 #include "chrome/browser/chrome_browser_application_mac.h" | 35 #include "chrome/browser/chrome_browser_application_mac.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 #if defined(OS_POSIX) | 38 #if defined(OS_POSIX) |
| 39 #include "base/shared_memory.h" | 39 #include "base/shared_memory.h" |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 #include "ui/gfx/compositor/compositor_setup.h" | 42 #include "ui/compositor/compositor_setup.h" |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 void RemoveSharedMemoryFile(const std::string& filename) { | 46 void RemoveSharedMemoryFile(const std::string& filename) { |
| 47 // Stats uses SharedMemory under the hood. On posix, this results in a file | 47 // Stats uses SharedMemory under the hood. On posix, this results in a file |
| 48 // on disk. | 48 // on disk. |
| 49 #if defined(OS_POSIX) | 49 #if defined(OS_POSIX) |
| 50 base::SharedMemory memory; | 50 base::SharedMemory memory; |
| 51 memory.Delete(filename); | 51 memory.Delete(filename); |
| 52 #endif | 52 #endif |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 #if defined(OS_MACOSX) | 223 #if defined(OS_MACOSX) |
| 224 base::mac::SetOverrideFrameworkBundle(NULL); | 224 base::mac::SetOverrideFrameworkBundle(NULL); |
| 225 #endif | 225 #endif |
| 226 | 226 |
| 227 base::StatsTable::set_current(NULL); | 227 base::StatsTable::set_current(NULL); |
| 228 stats_table_.reset(); | 228 stats_table_.reset(); |
| 229 RemoveSharedMemoryFile(stats_filename_); | 229 RemoveSharedMemoryFile(stats_filename_); |
| 230 | 230 |
| 231 base::TestSuite::Shutdown(); | 231 base::TestSuite::Shutdown(); |
| 232 } | 232 } |
| OLD | NEW |