Index: chrome/browser/chromeos/file_system_provider/request_manager.h |
diff --git a/chrome/browser/chromeos/file_system_provider/request_manager.h b/chrome/browser/chromeos/file_system_provider/request_manager.h |
index a712165964966b45d1171aa17041dd36b34a57fc..4b2d1da445dd984da352ec81dcecf36af36217c1 100644 |
--- a/chrome/browser/chromeos/file_system_provider/request_manager.h |
+++ b/chrome/browser/chromeos/file_system_provider/request_manager.h |
@@ -11,7 +11,6 @@ |
#include "base/callback.h" |
#include "base/files/file.h" |
#include "base/memory/scoped_ptr.h" |
-#include "chrome/browser/chromeos/file_system_provider/observer.h" |
#include "chrome/browser/chromeos/file_system_provider/provided_file_system_info.h" |
namespace base { |
@@ -27,54 +26,32 @@ typedef base::Callback<void(base::File::Error)> ErrorCallback; |
// Manages requests between the service, async utils and the providing |
// extensions. |
-// TODO(mtomasz): Create for each provided file system. |
-class RequestManager : public Observer { |
+class RequestManager { |
public: |
RequestManager(); |
virtual ~RequestManager(); |
// Creates a request and returns its request id (greater than 0). Returns 0 in |
// case of an error (eg. too many requests). The passed callbacks can be NULL. |
- int CreateRequest(const std::string& extension_id, |
- int file_system_id, |
- const SuccessCallback& success_callback, |
+ int CreateRequest(const SuccessCallback& success_callback, |
const ErrorCallback& error_callback); |
// Handles successful response for the |request_id|. If |has_next| is false, |
// then the request is disposed, after handling the |response|. On error, |
// returns false, and the request is disposed. |
- bool FulfillRequest(const std::string& extension_id, |
- int file_system_id, |
- int request_id, |
+ bool FulfillRequest(int request_id, |
scoped_ptr<base::DictionaryValue> response, |
bool has_next); |
// Handles error response for the |request_id|. If handling the error fails, |
// returns false. Always disposes the request. |
- bool RejectRequest(const std::string& extension_id, |
- int file_system_id, |
- int request_id, |
- base::File::Error error); |
- |
- // file_system_provider::Observer overrides. |
- virtual void OnProvidedFileSystemMount( |
- const ProvidedFileSystemInfo& file_system_info, |
- base::File::Error error) OVERRIDE; |
- virtual void OnProvidedFileSystemUnmount( |
- const ProvidedFileSystemInfo& file_system_info, |
- base::File::Error error) OVERRIDE; |
+ bool RejectRequest(int request_id, base::File::Error error); |
private: |
struct Request { |
Request(); |
~Request(); |
- // Providing extension's ID. |
- std::string extension_id; |
- |
- // Provided file system's ID. |
- int file_system_id; |
- |
// Callback to be called on success. |
SuccessCallback success_callback; |