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