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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 } | 268 } |
269 | 269 |
270 //----------------------------------------------------------------------------- | 270 //----------------------------------------------------------------------------- |
271 | 271 |
272 class HttpCache::QuicServerInfoFactoryAdaptor : public QuicServerInfoFactory { | 272 class HttpCache::QuicServerInfoFactoryAdaptor : public QuicServerInfoFactory { |
273 public: | 273 public: |
274 QuicServerInfoFactoryAdaptor(HttpCache* http_cache) | 274 QuicServerInfoFactoryAdaptor(HttpCache* http_cache) |
275 : http_cache_(http_cache) { | 275 : http_cache_(http_cache) { |
276 } | 276 } |
277 | 277 |
278 virtual QuicServerInfo* GetForHost(const std::string& hostname) OVERRIDE { | 278 virtual QuicServerInfo* GetForHostPortPair( |
wtc
2014/03/11 01:41:39
Nit: we can name this method "GetForServer". Then
Ryan Hamilton
2014/03/11 15:47:43
Nice! Or, if we're going to include scheme, we co
ramant (doing other things)
2014/03/13 01:50:12
Done.
ramant (doing other things)
2014/03/13 01:50:12
Acknowledged. Used GetServer per wtc's suggestion.
| |
279 return new DiskCacheBasedQuicServerInfo(hostname, http_cache_); | 279 const HostPortPair& host_port_pair) OVERRIDE { |
280 return new DiskCacheBasedQuicServerInfo(host_port_pair, http_cache_); | |
280 } | 281 } |
281 | 282 |
282 private: | 283 private: |
283 HttpCache* const http_cache_; | 284 HttpCache* const http_cache_; |
284 }; | 285 }; |
285 | 286 |
286 //----------------------------------------------------------------------------- | 287 //----------------------------------------------------------------------------- |
287 HttpCache::HttpCache(const net::HttpNetworkSession::Params& params, | 288 HttpCache::HttpCache(const net::HttpNetworkSession::Params& params, |
288 BackendFactory* backend_factory) | 289 BackendFactory* backend_factory) |
289 : net_log_(params.net_log), | 290 : net_log_(params.net_log), |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1172 building_backend_ = false; | 1173 building_backend_ = false; |
1173 DeletePendingOp(pending_op); | 1174 DeletePendingOp(pending_op); |
1174 } | 1175 } |
1175 | 1176 |
1176 // The cache may be gone when we return from the callback. | 1177 // The cache may be gone when we return from the callback. |
1177 if (!item->DoCallback(result, disk_cache_.get())) | 1178 if (!item->DoCallback(result, disk_cache_.get())) |
1178 item->NotifyTransaction(result, NULL); | 1179 item->NotifyTransaction(result, NULL); |
1179 } | 1180 } |
1180 | 1181 |
1181 } // namespace net | 1182 } // namespace net |
OLD | NEW |