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/disk_cache/in_flight_backend_io.h" | 5 #include "net/disk_cache/blockfile/in_flight_backend_io.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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 #include "net/disk_cache/backend_impl.h" | 12 #include "net/disk_cache/blockfile/backend_impl.h" |
13 #include "net/disk_cache/entry_impl.h" | 13 #include "net/disk_cache/blockfile/entry_impl.h" |
14 | 14 |
15 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order | 15 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order |
16 // to use the CACHE_UMA histogram macro. | 16 // to use the CACHE_UMA histogram macro. |
17 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_ | 17 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_ |
18 #include "net/disk_cache/histogram_macros.h" | 18 #include "net/disk_cache/blockfile/histogram_macros.h" |
19 | 19 |
20 namespace disk_cache { | 20 namespace disk_cache { |
21 | 21 |
22 BackendIO::BackendIO(InFlightIO* controller, BackendImpl* backend, | 22 BackendIO::BackendIO(InFlightIO* controller, BackendImpl* backend, |
23 const net::CompletionCallback& callback) | 23 const net::CompletionCallback& callback) |
24 : BackgroundIO(controller), | 24 : BackgroundIO(controller), |
25 backend_(backend), | 25 backend_(backend), |
26 callback_(callback), | 26 callback_(callback), |
27 operation_(OP_NONE), | 27 operation_(OP_NONE), |
28 entry_ptr_(NULL), | 28 entry_ptr_(NULL), |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 background_thread_->PostTask(FROM_HERE, | 517 background_thread_->PostTask(FROM_HERE, |
518 base::Bind(&BackendIO::ExecuteOperation, operation)); | 518 base::Bind(&BackendIO::ExecuteOperation, operation)); |
519 OnOperationPosted(operation); | 519 OnOperationPosted(operation); |
520 } | 520 } |
521 | 521 |
522 base::WeakPtr<InFlightBackendIO> InFlightBackendIO::GetWeakPtr() { | 522 base::WeakPtr<InFlightBackendIO> InFlightBackendIO::GetWeakPtr() { |
523 return ptr_factory_.GetWeakPtr(); | 523 return ptr_factory_.GetWeakPtr(); |
524 } | 524 } |
525 | 525 |
526 } // namespace | 526 } // namespace |
OLD | NEW |