summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 23:18:57 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 23:18:57 +0000
commitc238b694ea2c28b28c30f983e38ccf846a637234 (patch)
treec433efd3b140e0de5e0d016ae981e3edfc819e15 /chrome/common
parent3f39e609592b5e1901c2b53ff72f9f28e345c02a (diff)
downloadchromium_src-c238b694ea2c28b28c30f983e38ccf846a637234.zip
chromium_src-c238b694ea2c28b28c30f983e38ccf846a637234.tar.gz
chromium_src-c238b694ea2c28b28c30f983e38ccf846a637234.tar.bz2
linux: keep dictionaries in the user data dir.
BUG=11036 TEST=Dictionaries should end up in ~/.config/chromium/ Review URL: http://codereview.chromium.org/100281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_paths.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index fe4d778..c1b4ce6 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -112,8 +112,15 @@ bool PathProvider(int key, FilePath* result) {
create_dir = true;
break;
case chrome::DIR_APP_DICTIONARIES:
+#if defined(OS_LINUX)
+ // We can't write into the EXE dir on Linux, so keep dictionaries
+ // alongside the safe browsing database in the user data dir.
+ if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
+ return false;
+#else
if (!PathService::Get(base::DIR_EXE, &cur))
return false;
+#endif
cur = cur.Append(FILE_PATH_LITERAL("Dictionaries"));
create_dir = true;
break;