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

Side by Side Diff: chrome/test/base/chrome_test_suite.cc

Issue 8498034: [Mac] Move event hooks from CrApplication to BrowserCrApplication. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: And copyright, sigh. Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 13 matching lines...) Expand all
24 #include "net/base/net_errors.h" 24 #include "net/base/net_errors.h"
25 #include "net/base/net_util.h" 25 #include "net/base/net_util.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
28 #include "ui/base/ui_base_paths.h" 28 #include "ui/base/ui_base_paths.h"
29 #include "ui/gfx/test/gfx_test_utils.h" 29 #include "ui/gfx/test/gfx_test_utils.h"
30 30
31 #if defined(OS_MACOSX) 31 #if defined(OS_MACOSX)
32 #include "base/mac/mac_util.h" 32 #include "base/mac/mac_util.h"
33 #include "base/mac/scoped_nsautorelease_pool.h" 33 #include "base/mac/scoped_nsautorelease_pool.h"
34 #include "content/common/chrome_application_mac.h" 34 #include "chrome/browser/chrome_browser_application_mac.h"
35 #endif 35 #endif
36 36
37 #if defined(OS_POSIX) 37 #if defined(OS_POSIX)
38 #include "base/shared_memory.h" 38 #include "base/shared_memory.h"
39 #endif 39 #endif
40 40
41 namespace { 41 namespace {
42 42
43 void RemoveSharedMemoryFile(const std::string& filename) { 43 void RemoveSharedMemoryFile(const std::string& filename) {
44 // Stats uses SharedMemory under the hood. On posix, this results in a file 44 // Stats uses SharedMemory under the hood. On posix, this results in a file
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ChromeTestSuite::ChromeTestSuite(int argc, char** argv) 152 ChromeTestSuite::ChromeTestSuite(int argc, char** argv)
153 : base::TestSuite(argc, argv) { 153 : base::TestSuite(argc, argv) {
154 } 154 }
155 155
156 ChromeTestSuite::~ChromeTestSuite() { 156 ChromeTestSuite::~ChromeTestSuite() {
157 } 157 }
158 158
159 void ChromeTestSuite::Initialize() { 159 void ChromeTestSuite::Initialize() {
160 #if defined(OS_MACOSX) 160 #if defined(OS_MACOSX)
161 base::mac::ScopedNSAutoreleasePool autorelease_pool; 161 base::mac::ScopedNSAutoreleasePool autorelease_pool;
162 chrome_application_mac::RegisterCrApp(); 162 chrome_browser_application_mac::RegisterBrowserCrApp();
163 #endif 163 #endif
164 164
165 base::TestSuite::Initialize(); 165 base::TestSuite::Initialize();
166 166
167 chrome::RegisterChromeSchemes(); 167 chrome::RegisterChromeSchemes();
168 168
169 chrome::RegisterPathProvider(); 169 chrome::RegisterPathProvider();
170 content::RegisterPathProvider(); 170 content::RegisterPathProvider();
171 ui::RegisterPathProvider(); 171 ui::RegisterPathProvider();
172 172
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 #if defined(OS_MACOSX) 212 #if defined(OS_MACOSX)
213 base::mac::SetOverrideAppBundle(NULL); 213 base::mac::SetOverrideAppBundle(NULL);
214 #endif 214 #endif
215 215
216 base::StatsTable::set_current(NULL); 216 base::StatsTable::set_current(NULL);
217 stats_table_.reset(); 217 stats_table_.reset();
218 RemoveSharedMemoryFile(stats_filename_); 218 RemoveSharedMemoryFile(stats_filename_);
219 219
220 base::TestSuite::Shutdown(); 220 base::TestSuite::Shutdown();
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698