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_transaction.h" | 5 #include "net/http/http_cache_transaction.h" |
6 | 6 |
7 #include "build/build_config.h" // For OS_POSIX | 7 #include "build/build_config.h" // For OS_POSIX |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 515 |
516 bool HttpCache::Transaction::GetFullRequestHeaders( | 516 bool HttpCache::Transaction::GetFullRequestHeaders( |
517 HttpRequestHeaders* headers) const { | 517 HttpRequestHeaders* headers) const { |
518 if (network_trans_) | 518 if (network_trans_) |
519 return network_trans_->GetFullRequestHeaders(headers); | 519 return network_trans_->GetFullRequestHeaders(headers); |
520 | 520 |
521 // TODO(ttuttle): Read headers from cache. | 521 // TODO(ttuttle): Read headers from cache. |
522 return false; | 522 return false; |
523 } | 523 } |
524 | 524 |
525 int64 HttpCache::Transaction::GetTotalReceivedBytes() const { | 525 int64_t HttpCache::Transaction::GetTotalReceivedBytes() const { |
526 int64 total_received_bytes = total_received_bytes_; | 526 int64_t total_received_bytes = total_received_bytes_; |
527 if (network_trans_) | 527 if (network_trans_) |
528 total_received_bytes += network_trans_->GetTotalReceivedBytes(); | 528 total_received_bytes += network_trans_->GetTotalReceivedBytes(); |
529 return total_received_bytes; | 529 return total_received_bytes; |
530 } | 530 } |
531 | 531 |
532 int64_t HttpCache::Transaction::GetTotalSentBytes() const { | 532 int64_t HttpCache::Transaction::GetTotalSentBytes() const { |
533 int64_t total_sent_bytes = total_sent_bytes_; | 533 int64_t total_sent_bytes = total_sent_bytes_; |
534 if (network_trans_) | 534 if (network_trans_) |
535 total_sent_bytes += network_trans_->GetTotalSentBytes(); | 535 total_sent_bytes += network_trans_->GetTotalSentBytes(); |
536 return total_sent_bytes; | 536 return total_sent_bytes; |
(...skipping 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2934 default: | 2934 default: |
2935 NOTREACHED(); | 2935 NOTREACHED(); |
2936 } | 2936 } |
2937 } | 2937 } |
2938 | 2938 |
2939 void HttpCache::Transaction::OnIOComplete(int result) { | 2939 void HttpCache::Transaction::OnIOComplete(int result) { |
2940 DoLoop(result); | 2940 DoLoop(result); |
2941 } | 2941 } |
2942 | 2942 |
2943 } // namespace net | 2943 } // namespace net |
OLD | NEW |