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

Unified Diff: chrome/common/chrome_paths.cc

Issue 2679133004: Log into the user-data-dir instead of Chrome's bundle. (Closed)
Patch Set: Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index d490a6f7e73ef909cad84d290ad076d4c8c16646..122dd542eef10baa5ac77e6c67f3e42f27321892 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -146,18 +146,11 @@ bool PathProvider(int key, base::FilePath* result) {
#else
// Debug builds write next to the binary (in the build tree)
#if defined(OS_MACOSX)
- if (!PathService::Get(base::DIR_EXE, result))
- return false;
+ // Apps may not write into their own bundle.
if (base::mac::AmIBundled()) {
- // If we're called from chrome, dump it beside the app (outside the
- // app bundle), if we're called from a unittest, we'll already
- // outside the bundle so use the exe dir.
- // exe_dir gave us .../Chromium.app/Contents/MacOS/Chromium.
- *result = result->DirName();
- *result = result->DirName();
- *result = result->DirName();
+ return PathService::Get(chrome::DIR_USER_DATA, result);
}
- return true;
+ return PathService::Get(base::DIR_EXE, result);
#else
return PathService::Get(base::DIR_EXE, result);
#endif // defined(OS_MACOSX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698