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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 2660983002: Change ProfileIOData::CreateHttpFactory to take an (Closed)
Patch Set: Get HttpTransactionFactory from URLRequestContext directly Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } else { 750 } else {
751 cache_path = partition_descriptor.path.Append(chrome::kMediaCacheDirname); 751 cache_path = partition_descriptor.path.Append(chrome::kMediaCacheDirname);
752 } 752 }
753 753
754 // Use a separate HTTP disk cache for isolated apps. 754 // Use a separate HTTP disk cache for isolated apps.
755 std::unique_ptr<net::HttpCache::BackendFactory> media_backend( 755 std::unique_ptr<net::HttpCache::BackendFactory> media_backend(
756 new net::HttpCache::DefaultBackend( 756 new net::HttpCache::DefaultBackend(
757 net::MEDIA_CACHE, ChooseCacheBackendType(), cache_path, 757 net::MEDIA_CACHE, ChooseCacheBackendType(), cache_path,
758 cache_max_size, 758 cache_max_size,
759 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); 759 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)));
760 std::unique_ptr<net::HttpCache> media_http_cache = 760 std::unique_ptr<net::HttpCache> media_http_cache = CreateHttpFactory(
761 CreateHttpFactory(main_request_context_storage()->http_network_session(), 761 main_request_context()->http_transaction_factory(),
762 std::move(media_backend)); 762 std::move(media_backend));
763 763
764 // Transfer ownership of the cache to MediaRequestContext. 764 // Transfer ownership of the cache to MediaRequestContext.
765 context->SetHttpTransactionFactory(std::move(media_http_cache)); 765 context->SetHttpTransactionFactory(std::move(media_http_cache));
766 766
767 // Note that we do not create a new URLRequestJobFactory because 767 // Note that we do not create a new URLRequestJobFactory because
768 // the media context should behave exactly like its parent context 768 // the media context should behave exactly like its parent context
769 // in all respects except for cache behavior on media subresources. 769 // in all respects except for cache behavior on media subresources.
770 // The CopyFrom() step above means that our media context will use 770 // The CopyFrom() step above means that our media context will use
771 // the same URLRequestJobFactory instance that our parent context does. 771 // the same URLRequestJobFactory instance that our parent context does.
772 772
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 const base::Closure& completion) { 815 const base::Closure& completion) {
816 DCHECK_CURRENTLY_ON(BrowserThread::IO); 816 DCHECK_CURRENTLY_ON(BrowserThread::IO);
817 DCHECK(initialized()); 817 DCHECK(initialized());
818 818
819 DCHECK(transport_security_state()); 819 DCHECK(transport_security_state());
820 // Completes synchronously. 820 // Completes synchronously.
821 transport_security_state()->DeleteAllDynamicDataSince(time); 821 transport_security_state()->DeleteAllDynamicDataSince(time);
822 DCHECK(http_server_properties_manager_); 822 DCHECK(http_server_properties_manager_);
823 http_server_properties_manager_->Clear(completion); 823 http_server_properties_manager_->Clear(completion);
824 } 824 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698