| 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" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 return ERR_UNEXPECTED; | 257 return ERR_UNEXPECTED; |
| 258 | 258 |
| 259 SetRequest(net_log, request); | 259 SetRequest(net_log, request); |
| 260 if (infinite_cache_transaction_.get()) { | 260 if (infinite_cache_transaction_.get()) { |
| 261 if ((effective_load_flags_ & LOAD_BYPASS_CACHE) || | 261 if ((effective_load_flags_ & LOAD_BYPASS_CACHE) || |
| 262 (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) || | 262 (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) || |
| 263 (effective_load_flags_ & LOAD_DISABLE_CACHE) || | 263 (effective_load_flags_ & LOAD_DISABLE_CACHE) || |
| 264 (effective_load_flags_ & LOAD_VALIDATE_CACHE) || | 264 (effective_load_flags_ & LOAD_VALIDATE_CACHE) || |
| 265 (effective_load_flags_ & LOAD_PREFERRING_CACHE) || | 265 (effective_load_flags_ & LOAD_PREFERRING_CACHE) || |
| 266 partial_.get()) { | 266 partial_.get()) { |
| 267 if (effective_load_flags_ & LOAD_PREFERRING_CACHE) |
| 268 infinite_cache_transaction_->OnBackForwardNavigation(); |
| 267 infinite_cache_transaction_.reset(); | 269 infinite_cache_transaction_.reset(); |
| 268 } else { | 270 } else { |
| 269 infinite_cache_transaction_->OnRequestStart(request); | 271 infinite_cache_transaction_->OnRequestStart(request); |
| 270 } | 272 } |
| 271 } | 273 } |
| 272 | 274 |
| 273 // We have to wait until the backend is initialized so we start the SM. | 275 // We have to wait until the backend is initialized so we start the SM. |
| 274 next_state_ = STATE_GET_BACKEND; | 276 next_state_ = STATE_GET_BACKEND; |
| 275 int rv = DoLoop(OK); | 277 int rv = DoLoop(OK); |
| 276 | 278 |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 } | 2486 } |
| 2485 | 2487 |
| 2486 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { | 2488 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { |
| 2487 DCHECK(cache_io_start_.is_null()); | 2489 DCHECK(cache_io_start_.is_null()); |
| 2488 if (return_value == ERR_IO_PENDING) | 2490 if (return_value == ERR_IO_PENDING) |
| 2489 cache_io_start_ = base::TimeTicks::Now(); | 2491 cache_io_start_ = base::TimeTicks::Now(); |
| 2490 return return_value; | 2492 return return_value; |
| 2491 } | 2493 } |
| 2492 | 2494 |
| 2493 } // namespace net | 2495 } // namespace net |
| OLD | NEW |