Chromium Code Reviews| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 } | 159 } |
| 160 | 160 |
| 161 void ChromeTestSuite::Initialize() { | 161 void ChromeTestSuite::Initialize() { |
| 162 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
| 163 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 163 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 164 chrome_browser_application_mac::RegisterBrowserCrApp(); | 164 chrome_browser_application_mac::RegisterBrowserCrApp(); |
| 165 #endif | 165 #endif |
| 166 | 166 |
| 167 base::TestSuite::Initialize(); | 167 base::TestSuite::Initialize(); |
| 168 | 168 |
| 169 chrome::RegisterChromeSchemes(); | 169 chrome::ChromeContentClient client_for_init; |
| 170 content::SetContentClient(&client_for_init); | |
| 171 const bool kDontLockStandardSchemes = false; | |
| 172 content::RegisterContentSchemes(kDontLockStandardSchemes); | |
|
jam
2012/04/17 03:30:10
nit: i'm personally not a fan of adding variables
michaeln
2012/04/17 04:08:26
I've warmed up to this self-documenting style, but
michaeln
2012/04/17 04:11:46
Actually, the convention in webkit would be to mak
jam
2012/04/17 04:49:51
my preference would be to remove it :)
michaeln
2012/04/17 19:23:32
Done.
| |
| 173 content::SetContentClient(NULL); | |
| 170 | 174 |
| 171 chrome::RegisterPathProvider(); | 175 chrome::RegisterPathProvider(); |
| 172 content::RegisterPathProvider(); | 176 content::RegisterPathProvider(); |
| 173 ui::RegisterPathProvider(); | 177 ui::RegisterPathProvider(); |
| 174 | 178 |
| 175 if (!browser_dir_.empty()) { | 179 if (!browser_dir_.empty()) { |
| 176 PathService::Override(base::DIR_EXE, browser_dir_); | 180 PathService::Override(base::DIR_EXE, browser_dir_); |
| 177 PathService::Override(base::DIR_MODULE, browser_dir_); | 181 PathService::Override(base::DIR_MODULE, browser_dir_); |
| 178 } | 182 } |
| 179 | 183 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 #if defined(OS_MACOSX) | 218 #if defined(OS_MACOSX) |
| 215 base::mac::SetOverrideFrameworkBundle(NULL); | 219 base::mac::SetOverrideFrameworkBundle(NULL); |
| 216 #endif | 220 #endif |
| 217 | 221 |
| 218 base::StatsTable::set_current(NULL); | 222 base::StatsTable::set_current(NULL); |
| 219 stats_table_.reset(); | 223 stats_table_.reset(); |
| 220 RemoveSharedMemoryFile(stats_filename_); | 224 RemoveSharedMemoryFile(stats_filename_); |
| 221 | 225 |
| 222 base::TestSuite::Shutdown(); | 226 base::TestSuite::Shutdown(); |
| 223 } | 227 } |
| OLD | NEW |