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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 out->swap(new_connection_attempts); | 563 out->swap(new_connection_attempts); |
564 out->insert(out->begin(), old_connection_attempts_.begin(), | 564 out->insert(out->begin(), old_connection_attempts_.begin(), |
565 old_connection_attempts_.end()); | 565 old_connection_attempts_.end()); |
566 } | 566 } |
567 | 567 |
568 size_t HttpCache::Transaction::EstimateMemoryUsage() const { | 568 size_t HttpCache::Transaction::EstimateMemoryUsage() const { |
569 // TODO(xunjieli): Consider improving the coverage. crbug.com/669108. | 569 // TODO(xunjieli): Consider improving the coverage. crbug.com/669108. |
570 return 0; | 570 return 0; |
571 } | 571 } |
572 | 572 |
| 573 void HttpCache::Transaction::SetSharedWritingFailState(int result) { |
| 574 // TODO(shivanisha): Implement when integrated with HttpCache::Writers. |
| 575 NOTIMPLEMENTED(); |
| 576 } |
| 577 |
573 //----------------------------------------------------------------------------- | 578 //----------------------------------------------------------------------------- |
574 | 579 |
575 // A few common patterns: (Foo* means Foo -> FooComplete) | 580 // A few common patterns: (Foo* means Foo -> FooComplete) |
576 // | 581 // |
577 // 1. Not-cached entry: | 582 // 1. Not-cached entry: |
578 // Start(): | 583 // Start(): |
579 // GetBackend* -> InitEntry -> OpenEntry* -> CreateEntry* -> AddToEntry* -> | 584 // GetBackend* -> InitEntry -> OpenEntry* -> CreateEntry* -> AddToEntry* -> |
580 // SendRequest* -> SuccessfulSendRequest -> OverwriteCachedResponse -> | 585 // SendRequest* -> SuccessfulSendRequest -> OverwriteCachedResponse -> |
581 // CacheWriteResponse* -> TruncateCachedData* -> TruncateCachedMetadata* -> | 586 // CacheWriteResponse* -> TruncateCachedData* -> TruncateCachedMetadata* -> |
582 // PartialHeadersReceived | 587 // PartialHeadersReceived |
(...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3017 } | 3022 } |
3018 | 3023 |
3019 void HttpCache::Transaction::TransitionToState(State state) { | 3024 void HttpCache::Transaction::TransitionToState(State state) { |
3020 // Ensure that the state is only set once per Do* state. | 3025 // Ensure that the state is only set once per Do* state. |
3021 DCHECK(in_do_loop_); | 3026 DCHECK(in_do_loop_); |
3022 DCHECK_EQ(STATE_UNSET, next_state_) << "Next state is " << state; | 3027 DCHECK_EQ(STATE_UNSET, next_state_) << "Next state is " << state; |
3023 next_state_ = state; | 3028 next_state_ = state; |
3024 } | 3029 } |
3025 | 3030 |
3026 } // namespace net | 3031 } // namespace net |
OLD | NEW |