summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:47:18 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:47:18 +0000
commit20448a1990372714ec98cbfdb2a051c40bd30316 (patch)
tree5131d1e9fc3e17a2cae73a816a5daf131187e3df /chrome
parenta81e5f4317b551631f7d516594a6a12e11373535 (diff)
downloadchromium_src-20448a1990372714ec98cbfdb2a051c40bd30316.zip
chromium_src-20448a1990372714ec98cbfdb2a051c40bd30316.tar.gz
chromium_src-20448a1990372714ec98cbfdb2a051c40bd30316.tar.bz2
Revert 55450 - Fix CheckFalseTest.CheckFails on Linux after my change to ui_test.
This makes PathService clear its cache after overriding a path. We have many paths depending on each other, so this is necessary to avoid inconsistencies. Added a comment that PathService::Override should not be called by production code. TEST=ui_tests in Release mode BUG=49838 Review URL: http://codereview.chromium.org/2805100 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/profile_impl.cc14
-rw-r--r--chrome/common/logging_chrome_uitest.cc3
2 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
index dbf3462..bb335bf 100644
--- a/chrome/browser/profile_impl.cc
+++ b/chrome/browser/profile_impl.cc
@@ -299,15 +299,17 @@ ProfileImpl::ProfileImpl(const FilePath& path)
// for a spec on where cache files go. The net effect for most systems is we
// use ~/.cache/chromium/ for Chromium and ~/.cache/google-chrome/ for
// official builds.
+ if (!PathService::IsOverridden(chrome::DIR_USER_DATA)) {
#if defined(GOOGLE_CHROME_BUILD)
- const char kCacheDir[] = "google-chrome";
+ const char kCacheDir[] = "google-chrome";
#else
- const char kCacheDir[] = "chromium";
+ const char kCacheDir[] = "chromium";
#endif
- PathService::Get(base::DIR_USER_CACHE, &base_cache_path_);
- base_cache_path_ = base_cache_path_.Append(kCacheDir);
- if (!file_util::PathExists(base_cache_path_))
- file_util::CreateDirectory(base_cache_path_);
+ PathService::Get(base::DIR_USER_CACHE, &base_cache_path_);
+ base_cache_path_ = base_cache_path_.Append(kCacheDir);
+ if (!file_util::PathExists(base_cache_path_))
+ file_util::CreateDirectory(base_cache_path_);
+ }
#endif
if (base_cache_path_.empty())
base_cache_path_ = path_;
diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc
index 216f156..328a5a49 100644
--- a/chrome/common/logging_chrome_uitest.cc
+++ b/chrome/common/logging_chrome_uitest.cc
@@ -130,6 +130,9 @@ class CheckFalseTest : public UITest {
#elif defined(OS_MACOSX)
// Crash service doesn't exist for the Mac yet: http://crbug.com/45243
#define CheckFails DISABLED_CheckFails
+#elif defined(OS_LINUX)
+// TODO(phajdan) Fix this - http://crbug.com/49838
+#define CheckFails FAILS_CheckFails
#endif
// Launch the app in assertion test mode, then close the app.
TEST_F(CheckFalseTest, CheckFails) {