OLD | NEW |
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 "net/http/http_cache.h" | 5 #include "net/http/http_cache.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 | 10 |
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 if ((*it)->Matches(trans)) { | 1007 if ((*it)->Matches(trans)) { |
1008 delete *it; | 1008 delete *it; |
1009 pending_queue.erase(it); | 1009 pending_queue.erase(it); |
1010 return true; | 1010 return true; |
1011 } | 1011 } |
1012 } | 1012 } |
1013 return false; | 1013 return false; |
1014 } | 1014 } |
1015 | 1015 |
1016 void HttpCache::SetupQuicServerInfoFactory(HttpNetworkSession* session) { | 1016 void HttpCache::SetupQuicServerInfoFactory(HttpNetworkSession* session) { |
1017 if (session && session->params().enable_quic_persist_server_info && | 1017 if (session && |
1018 !session->quic_stream_factory()->has_quic_server_info_factory()) { | 1018 !session->quic_stream_factory()->has_quic_server_info_factory()) { |
1019 DCHECK(!quic_server_info_factory_); | 1019 DCHECK(!quic_server_info_factory_); |
1020 quic_server_info_factory_.reset(new QuicServerInfoFactoryAdaptor(this)); | 1020 quic_server_info_factory_.reset(new QuicServerInfoFactoryAdaptor(this)); |
1021 session->quic_stream_factory()->set_quic_server_info_factory( | 1021 session->quic_stream_factory()->set_quic_server_info_factory( |
1022 quic_server_info_factory_.get()); | 1022 quic_server_info_factory_.get()); |
1023 } | 1023 } |
1024 } | 1024 } |
1025 | 1025 |
1026 void HttpCache::ProcessPendingQueue(ActiveEntry* entry) { | 1026 void HttpCache::ProcessPendingQueue(ActiveEntry* entry) { |
1027 // Multiple readers may finish with an entry at once, so we want to batch up | 1027 // Multiple readers may finish with an entry at once, so we want to batch up |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 building_backend_ = false; | 1199 building_backend_ = false; |
1200 DeletePendingOp(pending_op); | 1200 DeletePendingOp(pending_op); |
1201 } | 1201 } |
1202 | 1202 |
1203 // The cache may be gone when we return from the callback. | 1203 // The cache may be gone when we return from the callback. |
1204 if (!item->DoCallback(result, disk_cache_.get())) | 1204 if (!item->DoCallback(result, disk_cache_.get())) |
1205 item->NotifyTransaction(result, NULL); | 1205 item->NotifyTransaction(result, NULL); |
1206 } | 1206 } |
1207 | 1207 |
1208 } // namespace net | 1208 } // namespace net |
OLD | NEW |