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

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

Issue 703123003: [fsp] Pass more detailed errors to the providing extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 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/file_system_provider/request_manager.cc
diff --git a/chrome/browser/chromeos/file_system_provider/request_manager.cc b/chrome/browser/chromeos/file_system_provider/request_manager.cc
index 214eab27b2282598eb0ad552aec5eed3038592a8..73bdbb344989cd597e7ab304f6fc72fe08a51b96 100644
--- a/chrome/browser/chromeos/file_system_provider/request_manager.cc
+++ b/chrome/browser/chromeos/file_system_provider/request_manager.cc
@@ -119,13 +119,14 @@ int RequestManager::CreateRequest(RequestType type,
return request_id;
}
-bool RequestManager::FulfillRequest(int request_id,
- scoped_ptr<RequestValue> response,
- bool has_more) {
+base::File::Error RequestManager::FulfillRequest(
+ int request_id,
+ scoped_ptr<RequestValue> response,
+ bool has_more) {
CHECK(response.get());
RequestMap::iterator request_it = requests_.find(request_id);
if (request_it == requests_.end())
- return false;
+ return base::File::FILE_ERROR_NOT_FOUND;
FOR_EACH_OBSERVER(Observer,
observers_,
@@ -141,16 +142,17 @@ bool RequestManager::FulfillRequest(int request_id,
ResetTimer(request_id);
}
- return true;
+ return base::File::FILE_OK;
}
-bool RequestManager::RejectRequest(int request_id,
- scoped_ptr<RequestValue> response,
- base::File::Error error) {
+base::File::Error RequestManager::RejectRequest(
+ int request_id,
+ scoped_ptr<RequestValue> response,
+ base::File::Error error) {
CHECK(response.get());
RequestMap::iterator request_it = requests_.find(request_id);
if (request_it == requests_.end())
- return false;
+ return base::File::FILE_ERROR_NOT_FOUND;
FOR_EACH_OBSERVER(Observer,
observers_,
@@ -158,7 +160,7 @@ bool RequestManager::RejectRequest(int request_id,
request_it->second->handler->OnError(request_id, response.Pass(), error);
DestroyRequest(request_id);
- return true;
+ return base::File::FILE_OK;
}
void RequestManager::SetTimeoutForTesting(const base::TimeDelta& timeout) {

Powered by Google App Engine
This is Rietveld 408576698