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

Unified Diff: trunk/src/chrome/browser/chromeos/file_system_provider/request_manager.cc

Issue 342003004: Revert 277929 "[fsp] Cleanup handling errors for operation reque..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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
Index: trunk/src/chrome/browser/chromeos/file_system_provider/request_manager.cc
===================================================================
--- trunk/src/chrome/browser/chromeos/file_system_provider/request_manager.cc (revision 278185)
+++ trunk/src/chrome/browser/chromeos/file_system_provider/request_manager.cc (working copy)
@@ -49,9 +49,7 @@
while (it != requests_.end()) {
const int request_id = it->first;
++it;
- RejectRequest(request_id,
- scoped_ptr<RequestValue>(new RequestValue()),
- base::File::FILE_ERROR_ABORT);
+ RejectRequest(request_id, base::File::FILE_ERROR_ABORT);
}
DCHECK_EQ(0u, requests_.size());
@@ -113,15 +111,15 @@
return true;
}
-bool RequestManager::RejectRequest(int request_id,
- scoped_ptr<RequestValue> response,
- base::File::Error error) {
+bool RequestManager::RejectRequest(int request_id, base::File::Error error) {
RequestMap::iterator request_it = requests_.find(request_id);
if (request_it == requests_.end())
return false;
- request_it->second->handler->OnError(request_id, response.Pass(), error);
+ request_it->second->handler->OnError(request_id, error);
+
FOR_EACH_OBSERVER(Observer, observers_, OnRequestRejected(request_id, error));
+
DestroyRequest(request_id);
return true;
@@ -152,9 +150,7 @@
void RequestManager::OnRequestTimeout(int request_id) {
FOR_EACH_OBSERVER(Observer, observers_, OnRequestTimeouted(request_id));
- RejectRequest(request_id,
- scoped_ptr<RequestValue>(new RequestValue()),
- base::File::FILE_ERROR_ABORT);
+ RejectRequest(request_id, base::File::FILE_ERROR_ABORT);
}
void RequestManager::DestroyRequest(int request_id) {

Powered by Google App Engine
This is Rietveld 408576698