| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 ConnectionAttempts* out) const { | 570 ConnectionAttempts* out) const { |
| 571 ConnectionAttempts new_connection_attempts; | 571 ConnectionAttempts new_connection_attempts; |
| 572 if (network_trans_) | 572 if (network_trans_) |
| 573 network_trans_->GetConnectionAttempts(&new_connection_attempts); | 573 network_trans_->GetConnectionAttempts(&new_connection_attempts); |
| 574 | 574 |
| 575 out->swap(new_connection_attempts); | 575 out->swap(new_connection_attempts); |
| 576 out->insert(out->begin(), old_connection_attempts_.begin(), | 576 out->insert(out->begin(), old_connection_attempts_.begin(), |
| 577 old_connection_attempts_.end()); | 577 old_connection_attempts_.end()); |
| 578 } | 578 } |
| 579 | 579 |
| 580 size_t HttpCache::Transaction::EstimateMemoryUsage() const { |
| 581 // TODO(xunjieli): Consider improving the coverage. crbug.com/669108. |
| 582 return 0; |
| 583 } |
| 584 |
| 580 //----------------------------------------------------------------------------- | 585 //----------------------------------------------------------------------------- |
| 581 | 586 |
| 582 // A few common patterns: (Foo* means Foo -> FooComplete) | 587 // A few common patterns: (Foo* means Foo -> FooComplete) |
| 583 // | 588 // |
| 584 // 1. Not-cached entry: | 589 // 1. Not-cached entry: |
| 585 // Start(): | 590 // Start(): |
| 586 // GetBackend* -> InitEntry -> OpenEntry* -> CreateEntry* -> AddToEntry* -> | 591 // GetBackend* -> InitEntry -> OpenEntry* -> CreateEntry* -> AddToEntry* -> |
| 587 // SendRequest* -> SuccessfulSendRequest -> OverwriteCachedResponse -> | 592 // SendRequest* -> SuccessfulSendRequest -> OverwriteCachedResponse -> |
| 588 // CacheWriteResponse* -> TruncateCachedData* -> TruncateCachedMetadata* -> | 593 // CacheWriteResponse* -> TruncateCachedData* -> TruncateCachedMetadata* -> |
| 589 // PartialHeadersReceived | 594 // PartialHeadersReceived |
| (...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 default: | 3000 default: |
| 2996 NOTREACHED(); | 3001 NOTREACHED(); |
| 2997 } | 3002 } |
| 2998 } | 3003 } |
| 2999 | 3004 |
| 3000 void HttpCache::Transaction::OnIOComplete(int result) { | 3005 void HttpCache::Transaction::OnIOComplete(int result) { |
| 3001 DoLoop(result); | 3006 DoLoop(result); |
| 3002 } | 3007 } |
| 3003 | 3008 |
| 3004 } // namespace net | 3009 } // namespace net |
| OLD | NEW |