| Index: chrome/browser/profile.cc
|
| diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
|
| index 7c7041e5e88d0700cbb8ba0b97a4223880e6fd32..710949faf61077ae6209b0a9ae397b5a995ebe73 100644
|
| --- a/chrome/browser/profile.cc
|
| +++ b/chrome/browser/profile.cc
|
| @@ -207,6 +207,20 @@ class OffTheRecordProfileImpl : public Profile,
|
| return request_context_;
|
| }
|
|
|
| + virtual URLRequestContext* GetRequestContextForMedia() {
|
| + if (!media_request_context_) {
|
| + FilePath cache_path = GetPath();
|
| + 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_;
|
| + }
|
| +
|
| virtual SessionService* GetSessionService() {
|
| // Don't save any sessions when off the record.
|
| return NULL;
|
| @@ -311,6 +325,9 @@ 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_;
|
| +
|
| // The download manager that only stores downloaded items in memory.
|
| scoped_refptr<DownloadManager> download_manager_;
|
|
|
| @@ -586,6 +603,20 @@ URLRequestContext* ProfileImpl::GetRequestContext() {
|
| return request_context_;
|
| }
|
|
|
| +URLRequestContext* ProfileImpl::GetRequestContextForMedia() {
|
| + if (!media_request_context_) {
|
| + FilePath cache_path = GetPath();
|
| + cache_path.Append(chrome::kMediaCacheDirname);
|
| + media_request_context_ = ChromeURLRequestContext::CreateOriginalForMedia(
|
| + this, cache_path);
|
| + media_request_context_->AddRef();
|
| +
|
| + DCHECK(media_request_context_->cookie_store());
|
| + }
|
| +
|
| + return media_request_context_;
|
| +}
|
| +
|
| HistoryService* ProfileImpl::GetHistoryService(ServiceAccessType sat) {
|
| if (!history_service_created_) {
|
| history_service_created_ = true;
|
|
|