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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 } | 562 } |
563 | 563 |
564 disk_cache::Backend* HttpCache::GetCurrentBackend() const { | 564 disk_cache::Backend* HttpCache::GetCurrentBackend() const { |
565 return disk_cache_.get(); | 565 return disk_cache_.get(); |
566 } | 566 } |
567 | 567 |
568 // static | 568 // static |
569 bool HttpCache::ParseResponseInfo(const char* data, int len, | 569 bool HttpCache::ParseResponseInfo(const char* data, int len, |
570 HttpResponseInfo* response_info, | 570 HttpResponseInfo* response_info, |
571 bool* response_truncated) { | 571 bool* response_truncated) { |
572 Pickle pickle(data, len); | 572 base::Pickle pickle(data, len); |
573 return response_info->InitFromPickle(pickle, response_truncated); | 573 return response_info->InitFromPickle(pickle, response_truncated); |
574 } | 574 } |
575 | 575 |
576 void HttpCache::WriteMetadata(const GURL& url, | 576 void HttpCache::WriteMetadata(const GURL& url, |
577 RequestPriority priority, | 577 RequestPriority priority, |
578 base::Time expected_response_time, | 578 base::Time expected_response_time, |
579 IOBuffer* buf, | 579 IOBuffer* buf, |
580 int buf_len) { | 580 int buf_len) { |
581 if (!buf_len) | 581 if (!buf_len) |
582 return; | 582 return; |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 building_backend_ = false; | 1380 building_backend_ = false; |
1381 DeletePendingOp(pending_op); | 1381 DeletePendingOp(pending_op); |
1382 } | 1382 } |
1383 | 1383 |
1384 // The cache may be gone when we return from the callback. | 1384 // The cache may be gone when we return from the callback. |
1385 if (!item->DoCallback(result, disk_cache_.get())) | 1385 if (!item->DoCallback(result, disk_cache_.get())) |
1386 item->NotifyTransaction(result, NULL); | 1386 item->NotifyTransaction(result, NULL); |
1387 } | 1387 } |
1388 | 1388 |
1389 } // namespace net | 1389 } // namespace net |
OLD | NEW |