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

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

Issue 2667633003: Fix HttpCache creation to use the correct API: CreateMainHttpCache and (Closed)
Patch Set: 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 | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | no next file » | 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // TODO(mmenke): It weird to combine state from 688 // TODO(mmenke): It weird to combine state from
689 // main_request_context_storage() objects and the argumet to this method, 689 // main_request_context_storage() objects and the argumet to this method,
690 // |main_context|. Remove |main_context| as an argument, and just use 690 // |main_context|. Remove |main_context| as an argument, and just use
691 // main_context() instead. 691 // main_context() instead.
692 net::HttpNetworkSession::Params network_params = 692 net::HttpNetworkSession::Params network_params =
693 main_request_context_storage()->http_network_session()->params(); 693 main_request_context_storage()->http_network_session()->params();
694 network_params.channel_id_service = channel_id_service.get(); 694 network_params.channel_id_service = channel_id_service.get();
695 std::unique_ptr<net::HttpNetworkSession> http_network_session( 695 std::unique_ptr<net::HttpNetworkSession> http_network_session(
696 new net::HttpNetworkSession(network_params)); 696 new net::HttpNetworkSession(network_params));
697 std::unique_ptr<net::HttpCache> app_http_cache = 697 std::unique_ptr<net::HttpCache> app_http_cache =
698 CreateHttpFactory(http_network_session.get(), std::move(app_backend)); 698 CreateMainHttpFactory(http_network_session.get(), std::move(app_backend));
699 699
700 // Transfer ownership of the ChannelIDStore and the HttpNetworkSession to the 700 // Transfer ownership of the ChannelIDStore and the HttpNetworkSession to the
701 // AppRequestContext. 701 // AppRequestContext.
702 context->SetChannelIDService(std::move(channel_id_service)); 702 context->SetChannelIDService(std::move(channel_id_service));
703 context->SetHttpNetworkSession(std::move(http_network_session)); 703 context->SetHttpNetworkSession(std::move(http_network_session));
704 704
705 // Transfer ownership of the cookies and cache to AppRequestContext. 705 // Transfer ownership of the cookies and cache to AppRequestContext.
706 context->SetCookieStore(std::move(cookie_store)); 706 context->SetCookieStore(std::move(cookie_store));
707 context->SetHttpTransactionFactory(std::move(app_http_cache)); 707 context->SetHttpTransactionFactory(std::move(app_http_cache));
708 708
(...skipping 106 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 | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698