| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void HttpCache::MetadataWriter::OnIOComplete(int result) { | 275 void HttpCache::MetadataWriter::OnIOComplete(int result) { |
| 276 if (!verified_) | 276 if (!verified_) |
| 277 return VerifyResponse(result); | 277 return VerifyResponse(result); |
| 278 SelfDestroy(); | 278 SelfDestroy(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 //----------------------------------------------------------------------------- | 281 //----------------------------------------------------------------------------- |
| 282 | 282 |
| 283 class HttpCache::QuicServerInfoFactoryAdaptor : public QuicServerInfoFactory { | 283 class HttpCache::QuicServerInfoFactoryAdaptor : public QuicServerInfoFactory { |
| 284 public: | 284 public: |
| 285 QuicServerInfoFactoryAdaptor(HttpCache* http_cache) | 285 explicit QuicServerInfoFactoryAdaptor(HttpCache* http_cache) |
| 286 : http_cache_(http_cache) { | 286 : http_cache_(http_cache) { |
| 287 } | 287 } |
| 288 | 288 |
| 289 QuicServerInfo* GetForServer(const QuicServerId& server_id) override { | 289 QuicServerInfo* GetForServer(const QuicServerId& server_id) override { |
| 290 return new DiskCacheBasedQuicServerInfo(server_id, http_cache_); | 290 return new DiskCacheBasedQuicServerInfo(server_id, http_cache_); |
| 291 } | 291 } |
| 292 | 292 |
| 293 private: | 293 private: |
| 294 HttpCache* const http_cache_; | 294 HttpCache* const http_cache_; |
| 295 }; | 295 }; |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 building_backend_ = false; | 1406 building_backend_ = false; |
| 1407 DeletePendingOp(pending_op); | 1407 DeletePendingOp(pending_op); |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 // The cache may be gone when we return from the callback. | 1410 // The cache may be gone when we return from the callback. |
| 1411 if (!item->DoCallback(result, disk_cache_.get())) | 1411 if (!item->DoCallback(result, disk_cache_.get())) |
| 1412 item->NotifyTransaction(result, NULL); | 1412 item->NotifyTransaction(result, NULL); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace net | 1415 } // namespace net |
| OLD | NEW |