Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: net/disk_cache/in_flight_io.cc

Issue 3452030: FBTF: Moves code to the headers. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/in_flight_io.h ('k') | net/disk_cache/rankings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « net/disk_cache/in_flight_io.h ('k') | net/disk_cache/rankings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698