diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 20:38:11 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 20:38:11 +0000 |
commit | d14c7ac0a14a2dc3984022aeadf830a3e30c99f3 (patch) | |
tree | 14b94d459b30e5156fa32daf318a217f79392d32 /chrome/browser/net | |
parent | 5d25637a208dbed17b10d31eb91221e6332a5e62 (diff) | |
download | chromium_src-d14c7ac0a14a2dc3984022aeadf830a3e30c99f3.zip chromium_src-d14c7ac0a14a2dc3984022aeadf830a3e30c99f3.tar.gz chromium_src-d14c7ac0a14a2dc3984022aeadf830a3e30c99f3.tar.bz2 |
Remove code path that passes a file handle to the renderer
Since the code now does range request without any caching
the code path for passing file handle is not used any more.
Changes:
1. Remove response_data_file in webkit_glue::ResourceResponseHead
2. Remove response_data_file in net::ResourceInfo
3. Remove code that passes file handle using IPC
4. Remove code that passes file hadnle from network layer to ResourceDispatcherHost
5. Remove MediaResourceHandler
6. Remove code in disk_cache that expose the file handle
7. Remove ChromeURLRequestContext::CreateOffTheRecordForMedia() so no more OTR request context for media, in OTR mode simply memory cache is used
8. Reset cache size for media cache to default
BUG=12249
BUG=12256
Review URL: http://codereview.chromium.org/113931
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 25 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.h | 4 |
2 files changed, 4 insertions, 25 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 6a3f404..304b506 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -197,16 +197,6 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOffTheRecord( } // 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 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateRequestContextForMedia( // 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 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateRequestContextForMedia( 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); - } - - // Set the cache type to media. - if (off_the_record) { - cache->set_type(net::TEMP_MEDIA_CACHE); - } else { - cache->set_type(net::MEDIA_CACHE); + disk_cache_path.ToWStringHack(), 0); } + cache->set_type(net::MEDIA_CACHE); context->http_transaction_factory_ = cache; return context; } diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 5ef64d6..bf8d119 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -47,10 +47,6 @@ class ChromeURLRequestContext : public URLRequestContext, // called on the UI thread. static ChromeURLRequestContext* CreateOffTheRecord(Profile* profile); - // Create an instance of request context for OTR profile for media resources. - static ChromeURLRequestContext* CreateOffTheRecordForMedia(Profile* profile, - const FilePath& disk_cache_path); - // Create an instance of request context for OTR profile for extensions. static ChromeURLRequestContext* CreateOffTheRecordForExtensions( Profile* profile); |