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

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

Issue 113931: Remove code path that passes a file handle to the renderer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 17048)
+++ chrome/browser/net/chrome_url_request_context.cc (working copy)
@@ -197,16 +197,6 @@
}
// static
-ChromeURLRequestContext* ChromeURLRequestContext::CreateOffTheRecordForMedia(
- Profile* profile, const FilePath& disk_cache_path) {
- // TODO(hclam): since we don't have an implementation of disk cache backend
- // for media files in OTR mode, we create a request context just like the
- // original one.
- DCHECK(profile->IsOffTheRecord());
- return CreateRequestContextForMedia(profile, disk_cache_path, true);
-}
-
-// static
ChromeURLRequestContext*
ChromeURLRequestContext::CreateOffTheRecordForExtensions(Profile* profile) {
DCHECK(profile->IsOffTheRecord());
@@ -233,8 +223,7 @@
// Also share the cookie store of the common profile.
context->cookie_store_ = original_context->cookie_store();
- // Create a media cache with maximum size of ~1.8GB, which is a
- // size cache backend won't complain.
+ // Create a media cache with default size.
// TODO(hclam): make the maximum size of media cache configurable.
net::HttpCache* original_cache =
original_context->http_transaction_factory()->GetCache();
@@ -248,21 +237,15 @@
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(), kint32max - kint32max / 10 - 1);
+ disk_cache_path.ToWStringHack(), 0);
} else {
// If original HttpCache doesn't exist, simply construct one with a whole
// new set of network stack.
cache = new net::HttpCache(original_context->proxy_service(),
- disk_cache_path.ToWStringHack(), kint32max - kint32max / 10 - 1);
+ disk_cache_path.ToWStringHack(), 0);
}
- // Set the cache type to media.
- if (off_the_record) {
- cache->set_type(net::TEMP_MEDIA_CACHE);
- } else {
- cache->set_type(net::MEDIA_CACHE);
- }
-
+ cache->set_type(net::MEDIA_CACHE);
context->http_transaction_factory_ = cache;
return context;
}
« 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