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

Unified Diff: chrome/browser/chromeos/drive/drive_protocol_handler.cc

Issue 10701050: net: Implement canceling of all async operations in FileStream. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
Index: chrome/browser/chromeos/drive/drive_protocol_handler.cc
diff --git a/chrome/browser/chromeos/drive/drive_protocol_handler.cc b/chrome/browser/chromeos/drive/drive_protocol_handler.cc
index abf8a87668b78cf2dd3e73bbe2b33a96c72c8e3f..3a0ed79570f6a0e12776ad5951fd452509bbfcbf 100644
--- a/chrome/browser/chromeos/drive/drive_protocol_handler.cc
+++ b/chrome/browser/chromeos/drive/drive_protocol_handler.cc
@@ -77,10 +77,6 @@ std::string FixupMimeType(const std::string& type) {
return type;
}
-// Empty callback for net::FileStream::Close().
-void EmptyCompletionCallback(int) {
-}
-
// Helper function that extracts and unescapes resource_id from drive urls
// (drive:<resource_id>).
bool ParseDriveUrl(const std::string& path, std::string* resource_id) {
@@ -835,9 +831,6 @@ void DriveURLRequestJob::RecordBytesRead(int bytes_read) {
void DriveURLRequestJob::CloseFileStream() {
if (!stream_.get())
hashimoto 2012/11/05 02:29:19 nit: Since we no longer need to NULL check here, c
satorux1 2012/11/05 03:18:35 +1
pivanof 2012/11/05 05:17:46 Done.
return;
- stream_->Close(base::Bind(&EmptyCompletionCallback));
- // net::FileStream::Close blocks until stream is closed, so it's safe to
- // release the pointer here.
stream_.reset(NULL);
}

Powered by Google App Engine
This is Rietveld 408576698