| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 bypass_lock_for_test_(false), | 331 bypass_lock_for_test_(false), |
| 332 fail_conditionalization_for_test_(false), | 332 fail_conditionalization_for_test_(false), |
| 333 io_buf_len_(0), | 333 io_buf_len_(0), |
| 334 read_offset_(0), | 334 read_offset_(0), |
| 335 effective_load_flags_(0), | 335 effective_load_flags_(0), |
| 336 write_len_(0), | 336 write_len_(0), |
| 337 transaction_pattern_(PATTERN_UNDEFINED), | 337 transaction_pattern_(PATTERN_UNDEFINED), |
| 338 total_received_bytes_(0), | 338 total_received_bytes_(0), |
| 339 websocket_handshake_stream_base_create_helper_(NULL), | 339 websocket_handshake_stream_base_create_helper_(NULL), |
| 340 weak_factory_(this) { | 340 weak_factory_(this) { |
| 341 COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders == | 341 static_assert(HttpCache::Transaction::kNumValidationHeaders == |
| 342 arraysize(kValidationHeaders), | 342 arraysize(kValidationHeaders), |
| 343 Invalid_number_of_validation_headers); | 343 "invalid number of validation headers"); |
| 344 | 344 |
| 345 io_callback_ = base::Bind(&Transaction::OnIOComplete, | 345 io_callback_ = base::Bind(&Transaction::OnIOComplete, |
| 346 weak_factory_.GetWeakPtr()); | 346 weak_factory_.GetWeakPtr()); |
| 347 } | 347 } |
| 348 | 348 |
| 349 HttpCache::Transaction::~Transaction() { | 349 HttpCache::Transaction::~Transaction() { |
| 350 // We may have to issue another IO, but we should never invoke the callback_ | 350 // We may have to issue another IO, but we should never invoke the callback_ |
| 351 // after this point. | 351 // after this point. |
| 352 callback_.Reset(); | 352 callback_.Reset(); |
| 353 | 353 |
| (...skipping 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3271 | 3271 |
| 3272 void HttpCache::Transaction::OnIOComplete(int result) { | 3272 void HttpCache::Transaction::OnIOComplete(int result) { |
| 3273 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. | 3273 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. |
| 3274 tracked_objects::ScopedTracker tracking_profile( | 3274 tracked_objects::ScopedTracker tracking_profile( |
| 3275 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete")); | 3275 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete")); |
| 3276 | 3276 |
| 3277 DoLoop(result); | 3277 DoLoop(result); |
| 3278 } | 3278 } |
| 3279 | 3279 |
| 3280 } // namespace net | 3280 } // namespace net |
| OLD | NEW |