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

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

Issue 11411159: base/prefs: Break the dependency in chrome_paths.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
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
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/metrics/stats_table.h" 15 #include "base/metrics/stats_table.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/prefs/pref_paths.h"
17 #include "base/process_util.h" 18 #include "base/process_util.h"
18 #include "base/stringprintf.h" 19 #include "base/stringprintf.h"
19 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
20 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chrome_content_browser_client.h" 22 #include "chrome/browser/chrome_content_browser_client.h"
22 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_content_client.h" 24 #include "chrome/common/chrome_content_client.h"
24 #include "chrome/common/chrome_paths.h" 25 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/url_constants.h" 26 #include "chrome/common/url_constants.h"
26 #include "chrome/test/base/testing_browser_process.h" 27 #include "chrome/test/base/testing_browser_process.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 chrome_browser_application_mac::RegisterBrowserCrApp(); 201 chrome_browser_application_mac::RegisterBrowserCrApp();
201 #endif // !defined(OS_IOS) 202 #endif // !defined(OS_IOS)
202 #endif 203 #endif
203 204
204 #if defined(OS_ANDROID) 205 #if defined(OS_ANDROID)
205 // Register JNI bindings for android. 206 // Register JNI bindings for android.
206 net::android::RegisterJni(base::android::AttachCurrentThread()); 207 net::android::RegisterJni(base::android::AttachCurrentThread());
207 chrome::android::RegisterJni(base::android::AttachCurrentThread()); 208 chrome::android::RegisterJni(base::android::AttachCurrentThread());
208 #endif 209 #endif
209 210
211 base::prefs::RegisterPathProvider();
210 chrome::RegisterPathProvider(); 212 chrome::RegisterPathProvider();
211 if (!browser_dir_.empty()) { 213 if (!browser_dir_.empty()) {
212 PathService::Override(base::DIR_EXE, browser_dir_); 214 PathService::Override(base::DIR_EXE, browser_dir_);
213 PathService::Override(base::DIR_MODULE, browser_dir_); 215 PathService::Override(base::DIR_MODULE, browser_dir_);
214 } 216 }
215 217
216 // Disable external libraries load if we are under python process in 218 // Disable external libraries load if we are under python process in
217 // ChromeOS. That means we are autotest and, if ASAN is used, 219 // ChromeOS. That means we are autotest and, if ASAN is used,
218 // external libraries load crashes. 220 // external libraries load crashes.
219 content::ContentTestSuiteBase::set_external_libraries_enabled( 221 content::ContentTestSuiteBase::set_external_libraries_enabled(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 #if defined(OS_MACOSX) && !defined(OS_IOS) 264 #if defined(OS_MACOSX) && !defined(OS_IOS)
263 base::mac::SetOverrideFrameworkBundle(NULL); 265 base::mac::SetOverrideFrameworkBundle(NULL);
264 #endif 266 #endif
265 267
266 base::StatsTable::set_current(NULL); 268 base::StatsTable::set_current(NULL);
267 stats_table_.reset(); 269 stats_table_.reset();
268 RemoveSharedMemoryFile(stats_filename_); 270 RemoveSharedMemoryFile(stats_filename_);
269 271
270 base::TestSuite::Shutdown(); 272 base::TestSuite::Shutdown();
271 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698