From 1ee311fa45ce9c1e4abe3ee1ea25117fbe09257e Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 12 Jul 2016 15:00:12 -0400 Subject: [PATCH] Move HTTP cache to a subfolder of CefSettings.cache_path (issue #1940) --- libcef/browser/net/url_request_context_getter_impl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index 53929850c..ed517a906 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -247,11 +247,14 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { storage_->set_http_server_properties(base::WrapUnique( new net::HttpServerPropertiesImpl)); + base::FilePath http_cache_path; + if (!cache_path.empty()) + http_cache_path = cache_path.Append(FILE_PATH_LITERAL("Cache")); std::unique_ptr main_backend( new net::HttpCache::DefaultBackend( cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, - cache_path, + http_cache_path, 0, BrowserThread::GetMessageLoopProxyForThread( BrowserThread::CACHE)));