| 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/url_request/view_cache_helper.h" | 5 #include "net/url_request/view_cache_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/profiler/scoped_tracker.h" | |
| 10 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 11 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| 12 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
| 13 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 14 #include "net/disk_cache/disk_cache.h" | 13 #include "net/disk_cache/disk_cache.h" |
| 15 #include "net/http/http_cache.h" | 14 #include "net/http/http_cache.h" |
| 16 #include "net/http/http_response_headers.h" | 15 #include "net/http/http_response_headers.h" |
| 17 #include "net/http/http_response_info.h" | 16 #include "net/http/http_response_info.h" |
| 18 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
| 19 | 18 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 next_state_ = STATE_READ_DATA; | 355 next_state_ = STATE_READ_DATA; |
| 357 } else { | 356 } else { |
| 358 data_->append(VIEW_CACHE_TAIL); | 357 data_->append(VIEW_CACHE_TAIL); |
| 359 entry_->Close(); | 358 entry_->Close(); |
| 360 entry_ = NULL; | 359 entry_ = NULL; |
| 361 } | 360 } |
| 362 return OK; | 361 return OK; |
| 363 } | 362 } |
| 364 | 363 |
| 365 void ViewCacheHelper::OnIOComplete(int result) { | 364 void ViewCacheHelper::OnIOComplete(int result) { |
| 366 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. | |
| 367 tracked_objects::ScopedTracker tracking_profile( | |
| 368 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 ViewCacheHelper::OnIOComplete")); | |
| 369 | |
| 370 DoLoop(result); | 365 DoLoop(result); |
| 371 } | 366 } |
| 372 | 367 |
| 373 } // namespace net. | 368 } // namespace net. |
| OLD | NEW |