| Index: net/disk_cache/in_flight_io.cc
|
| diff --git a/net/disk_cache/in_flight_io.cc b/net/disk_cache/in_flight_io.cc
|
| index 6112a9c8f913e313a99f2c68343fb7ef9c4bf32d..5c859aff9ec8b093dd35eff589f531b64df1a0af 100644
|
| --- a/net/disk_cache/in_flight_io.cc
|
| +++ b/net/disk_cache/in_flight_io.cc
|
| @@ -8,6 +8,10 @@
|
|
|
| namespace disk_cache {
|
|
|
| +BackgroundIO::BackgroundIO(InFlightIO* controller)
|
| + : controller_(controller), result_(-1), io_completed_(true, false) {
|
| +}
|
| +
|
| // Runs on the primary thread.
|
| void BackgroundIO::OnIOSignalled() {
|
| if (controller_)
|
| @@ -19,6 +23,8 @@ void BackgroundIO::Cancel() {
|
| controller_ = NULL;
|
| }
|
|
|
| +BackgroundIO::~BackgroundIO() {}
|
| +
|
| // Runs on the background thread.
|
| void BackgroundIO::NotifyController() {
|
| controller_->OnIOComplete(this);
|
| @@ -26,6 +32,14 @@ void BackgroundIO::NotifyController() {
|
|
|
| // ---------------------------------------------------------------------------
|
|
|
| +InFlightIO::InFlightIO()
|
| + : callback_thread_(base::MessageLoopProxy::CreateForCurrentThread()),
|
| + running_(false), single_thread_(false) {
|
| +}
|
| +
|
| +InFlightIO::~InFlightIO() {
|
| +}
|
| +
|
| void InFlightIO::WaitForPendingIO() {
|
| while (!io_list_.empty()) {
|
| // Block the current thread until all pending IO completes.
|
|
|