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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 1839283002: [Cronet] Purge storage directory if version does not match (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 8 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 | « components/cronet/android/test/javatests/src/org/chromium/net/SdchTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/url_request_context_config.cc
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
index 66f9fb06e053ac65bbd6bd6244bb171a4529129a..5d1a00bcc3a2ab00dfa1bda1631d9e2e25b023e9 100644
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
@@ -25,6 +25,8 @@ namespace cronet {
namespace {
+// Name of disk cache directory.
+const char kDiskCacheDirectoryName[] = "disk_cache";
// TODO(xunjieli): Refactor constants in io_thread.cc.
const char kQuicFieldTrialName[] = "QUIC";
const char kQuicConnectionOptions[] = "connection_options";
@@ -276,7 +278,9 @@ void URLRequestContextConfig::ConfigureURLRequestContextBuilder(
net::URLRequestContextBuilder::HttpCacheParams cache_params;
if (http_cache == DISK && !storage_path.empty()) {
cache_params.type = net::URLRequestContextBuilder::HttpCacheParams::DISK;
- cache_params.path = base::FilePath(storage_path);
+ cache_params.path =
+ base::FilePath(storage_path)
+ .Append(FILE_PATH_LITERAL(kDiskCacheDirectoryName));
} else {
cache_params.type =
net::URLRequestContextBuilder::HttpCacheParams::IN_MEMORY;
« no previous file with comments | « components/cronet/android/test/javatests/src/org/chromium/net/SdchTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698