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

Unified Diff: chrome/browser/profile.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
Index: chrome/browser/profile.cc
===================================================================
--- chrome/browser/profile.cc (revision 17048)
+++ chrome/browser/profile.cc (working copy)
@@ -100,7 +100,6 @@
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 @@
virtual ~OffTheRecordProfileImpl() {
CleanupRequestContext(request_context_);
- CleanupRequestContext(media_request_context_);
CleanupRequestContext(extensions_request_context_);
}
@@ -237,26 +235,8 @@
}
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 @@
// 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.
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/browser/renderer_host/media_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698