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

Unified Diff: chrome/browser/profile.cc

Issue 21094: Adds a command line switch to allow the user to specify the location... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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 | « AUTHORS ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
===================================================================
--- chrome/browser/profile.cc (revision 9343)
+++ chrome/browser/profile.cc (working copy)
@@ -532,6 +532,15 @@
FilePath cookie_path = GetPath();
cookie_path = cookie_path.Append(chrome::kCookieFilename);
FilePath cache_path = GetPath();
+
+ // Override the cache location if specified by the user.
+ const std::wstring user_cache_dir(
+ CommandLine::ForCurrentProcess()->GetSwitchValue(
+ switches::kDiskCacheDir));
+ if (!user_cache_dir.empty()) {
+ cache_path = FilePath::FromWStringHack(user_cache_dir);
+ }
+
cache_path = cache_path.Append(chrome::kCacheDirname);
request_context_ = ChromeURLRequestContext::CreateOriginal(
this, cookie_path, cache_path);
« no previous file with comments | « AUTHORS ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698