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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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* GetForServer( | 278 virtual QuicServerInfo* GetForServer( |
279 const QuicSessionKey& server_key) OVERRIDE { | 279 const QuicServerId& server_id) OVERRIDE { |
280 return new DiskCacheBasedQuicServerInfo(server_key, http_cache_); | 280 return new DiskCacheBasedQuicServerInfo(server_id, http_cache_); |
281 } | 281 } |
282 | 282 |
283 private: | 283 private: |
284 HttpCache* const http_cache_; | 284 HttpCache* const http_cache_; |
285 }; | 285 }; |
286 | 286 |
287 //----------------------------------------------------------------------------- | 287 //----------------------------------------------------------------------------- |
288 HttpCache::HttpCache(const net::HttpNetworkSession::Params& params, | 288 HttpCache::HttpCache(const net::HttpNetworkSession::Params& params, |
289 BackendFactory* backend_factory) | 289 BackendFactory* backend_factory) |
290 : net_log_(params.net_log), | 290 : net_log_(params.net_log), |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 building_backend_ = false; | 1173 building_backend_ = false; |
1174 DeletePendingOp(pending_op); | 1174 DeletePendingOp(pending_op); |
1175 } | 1175 } |
1176 | 1176 |
1177 // The cache may be gone when we return from the callback. | 1177 // The cache may be gone when we return from the callback. |
1178 if (!item->DoCallback(result, disk_cache_.get())) | 1178 if (!item->DoCallback(result, disk_cache_.get())) |
1179 item->NotifyTransaction(result, NULL); | 1179 item->NotifyTransaction(result, NULL); |
1180 } | 1180 } |
1181 | 1181 |
1182 } // namespace net | 1182 } // namespace net |
OLD | NEW |