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

Unified Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 146136: Add a command line switch to allow setting the max size... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/net/chrome_url_request_context.h ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.cc
===================================================================
--- chrome/browser/net/chrome_url_request_context.cc (revision 19096)
+++ chrome/browser/net/chrome_url_request_context.cc (working copy)
@@ -108,7 +108,7 @@
// static
ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal(
Profile* profile, const FilePath& cookie_store_path,
- const FilePath& disk_cache_path) {
+ const FilePath& disk_cache_path, int cache_size) {
DCHECK(!profile->IsOffTheRecord());
ChromeURLRequestContext* context = new ChromeURLRequestContext(profile);
@@ -121,7 +121,7 @@
net::HttpCache* cache =
new net::HttpCache(context->host_resolver_,
context->proxy_service_,
- disk_cache_path.ToWStringHack(), 0);
+ disk_cache_path.ToWStringHack(), cache_size);
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
bool record_mode = chrome::kRecordModeEnabled &&
@@ -161,9 +161,10 @@
// static
ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginalForMedia(
- Profile* profile, const FilePath& disk_cache_path) {
+ Profile* profile, const FilePath& disk_cache_path, int cache_size) {
DCHECK(!profile->IsOffTheRecord());
- return CreateRequestContextForMedia(profile, disk_cache_path, false);
+ return CreateRequestContextForMedia(profile, disk_cache_path, cache_size,
+ false);
}
// static
@@ -223,7 +224,8 @@
// static
ChromeURLRequestContext* ChromeURLRequestContext::CreateRequestContextForMedia(
- Profile* profile, const FilePath& disk_cache_path, bool off_the_record) {
+ Profile* profile, const FilePath& disk_cache_path, int cache_size,
+ bool off_the_record) {
URLRequestContext* original_context =
profile->GetOriginalProfile()->GetRequestContext();
ChromeURLRequestContext* context = new ChromeURLRequestContext(profile);
@@ -248,13 +250,13 @@
net::HttpNetworkLayer* original_network_layer =
static_cast<net::HttpNetworkLayer*>(original_cache->network_layer());
cache = new net::HttpCache(original_network_layer->GetSession(),
- disk_cache_path.ToWStringHack(), 0);
+ disk_cache_path.ToWStringHack(), cache_size);
} else {
// If original HttpCache doesn't exist, simply construct one with a whole
// new set of network stack.
cache = new net::HttpCache(original_context->host_resolver(),
original_context->proxy_service(),
- disk_cache_path.ToWStringHack(), 0);
+ disk_cache_path.ToWStringHack(), cache_size);
}
cache->set_type(net::MEDIA_CACHE);
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.h ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698