summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:38:11 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:38:11 +0000
commitd14c7ac0a14a2dc3984022aeadf830a3e30c99f3 (patch)
tree14b94d459b30e5156fa32daf318a217f79392d32 /chrome/browser/profile.cc
parent5d25637a208dbed17b10d31eb91221e6332a5e62 (diff)
downloadchromium_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/profile.cc')
-rw-r--r--chrome/browser/profile.cc27
1 files changed, 2 insertions, 25 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 1435288..e5d007e 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -100,7 +100,6 @@ class OffTheRecordProfileImpl : public Profile,
public:
explicit OffTheRecordProfileImpl(Profile* real_profile)
: profile_(real_profile),
- media_request_context_(NULL),
extensions_request_context_(NULL),
start_time_(Time::Now()) {
request_context_ = ChromeURLRequestContext::CreateOffTheRecord(this);
@@ -117,7 +116,6 @@ class OffTheRecordProfileImpl : public Profile,
virtual ~OffTheRecordProfileImpl() {
CleanupRequestContext(request_context_);
- CleanupRequestContext(media_request_context_);
CleanupRequestContext(extensions_request_context_);
}
@@ -237,26 +235,8 @@ class OffTheRecordProfileImpl : public Profile,
}
virtual URLRequestContext* GetRequestContextForMedia() {
- if (!media_request_context_) {
- FilePath cache_path = GetPath();
-
- // Override the cache location if specified by the user.
- const std::wstring user_cache_dir(
- CommandLine::ForCurrentProcess()->GetSwitchValue(
- switches::kDiskCacheDir));
- if (!user_cache_dir.empty()) {
- cache_path = FilePath::FromWStringHack(user_cache_dir);
- }
-
- cache_path = cache_path.Append(chrome::kOffTheRecordMediaCacheDirname);
- media_request_context_ =
- ChromeURLRequestContext::CreateOffTheRecordForMedia(
- this, cache_path);
- media_request_context_->AddRef();
-
- DCHECK(media_request_context_->cookie_store());
- }
- return media_request_context_;
+ // In OTR mode, media request context is the same as the original one.
+ return request_context_;
}
URLRequestContext* GetRequestContextForExtensions() {
@@ -377,9 +357,6 @@ class OffTheRecordProfileImpl : public Profile,
// The context to use for requests made from this OTR session.
ChromeURLRequestContext* request_context_;
- // The context for requests for media resources.
- ChromeURLRequestContext* media_request_context_;
-
ChromeURLRequestContext* extensions_request_context_;
// The download manager that only stores downloaded items in memory.